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
Hi can anyone tell what is a start up code?
Why is c so popular?
What is an operator?
what does static variable mean?
What is pointer to pointer in c language?
How do you determine whether to use a stream function or a low-level function?
Is there anything like an ifdef for typedefs?
What is the meaning of c in c language?
Differentiate abs() function from fabs() function.
Why is void main used?
Define Spanning-Tree Protocol (STP)
Is c is a middle level language?
Describe wild pointers in c?
What are variables and it what way is it different from constants?
How can I invoke another program or command and trap its output?