write the program for prime numbers?
Answer Posted / pavankumar
void main()
{
int i=2;
int count=0;
int n;
printf("enter a no");
scanf("%d",&n);
for(i=2;i<n/2;i++)
{
if(n%i==0)
{
count++;
}
if(count>1)
{
prinf("prime");
else
printf("not prime");
}
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Which built-in library function can be used to match a patter from the string?
What does %c mean in c?
What is a wrapper function in c?
hi, which software companys will take,if d candidate's % is jst 55%?
What is quick sort in c?
How do you determine the length of a string value that was stored in a variable?
Does c have enums?
Why is sprintf unsafe?
How to declare pointer variables?
What are data types in c language?
What is console in c language?
What is scope rule in c?
What is meant by keywords in c?
Does c have class?
What is FIFO?