how i m write c program 1.check prime number 2.prime number
series
Answer Posted / sulthan
#include<stdio.h>
void main()
{
int a,i,n=0;
printf("\nEnter the Number");
scanf("%d",&a);
for(i=1;i<=a;i++)
if(a%i==0)
n++;
if(n=2)
printf("Prime")
else
printf("NOT Prime");
}
| Is This Answer Correct ? | 5 Yes | 2 No |
Post New Answer View All Answers
Explain the difference between null pointer and void pointer.
explain how do you use macro?
If errno contains a nonzero number, is there an error?
What are register variables? What are the advantage of using register variables?
What is the concatenation operator?
What are the application of c?
What are # preprocessor operator in c?
What is logical error?
The file stdio.h, what does it contain?
What is wrong with this code?
How do you define a function?
Explain what are bus errors, memory faults, and core dumps?
using only #include
write a program to concatenation the string using switch case?
What is actual argument?