write the program for prime numbers?
Answer Posted / arfu
#include<stdio.h>
int main()
{
int c,i,n;
c=0;
scanf("%d",&a);
for(i=2;i<a;i++)
if (n%i==0)
{
c=1;break;
}
if(c!=1)`("prime");
else printf ("not a prime");
}
Is This Answer Correct ? | 110 Yes | 89 No |
Post New Answer View All Answers
what are # pragma staments?
Explain 'bus error'?
Do you know the use of 'auto' keyword?
Tell us the use of fflush() function in c language?
How is a null pointer different from a dangling pointer?
What is the purpose of void in c?
Why is c not oop?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
What is the difference between Printf(..) and sprint(...) ?
What are the application of void data type in c?
What is infinite loop?
What are valid signatures for the Main function?
what is the diffrenet bettwen HTTP and internet protocol
Explain what is meant by 'bit masking'?