Write a program to check whether a number is prime or not using c?
Answer / Ram Dwivedi
[Code omitted due to character limit. Here's the code in multiple lines:]nn```cn#include <stdio.h>nnint main() {n int num, i;n printf("Enter a number: ");n scanf("%d", &num);nn if (num <= 1) {n printf("%d is not prime
", num);n } else {n for (i = 2; i < sqrt(num); i++) {n if (num % i == 0) {n printf("%d is not prime
", num);n break;n }n }n if (i > sqrt(num)) {n printf("%d is prime
", num);n }n }n}n```
| Is This Answer Correct ? | 0 Yes | 0 No |
In this assignment you are asked to write a multithreaded program to find the duplicates in an array of 10 million integers. The integers are between -5000,000 to 5000,000 and are generated randomly. Use 10 threads, each thread works on 1000,000 integers. Compare the time needed to accomplish the task with single thread of execution program. Do not include the time to fill the array with integers in the execution time.
How would you rename a function in C?
how we can make 3d venturing graphics on outer interface
how to execute with out main in cprogram
What are static functions?
In which language linux is written?
What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
Explain union. What are its advantages?
Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors
Write programs for String Reversal & Palindrome check
whitch value return void main?
What is the Difference between Class and Struct?