write the program for prime numbers?
Answer Posted / karthika
#include<stdio.h>
#include<conio.h>
void main()
{
int num,i=2;
clrscr();
printf("\n entert a number");
scanf("%d",&num);
while(c<=num-1)
{
if(num%i==0)
{
printf("given number is not a prime number\n");
break;
}
i++;
}
if(i==num);
printf(given number is a prime number\n");
getch();
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the application of void data type in c?
Is there sort function in c?
Explain pointers in c programming?
What is the difference between volatile and const volatile?
Why is c not oop?
What is identifiers in c with examples?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
code for replace tabs with equivalent number of blanks
Which is better oop or procedural?
Explain the binary height balanced tree?
Why is not a pointer null after calling free?
What does %2f mean in c?
What is data type long in c?
What is the sizeof () a pointer?
What are the advantages of c language?