write the program for prime numbers?
Answer Posted / sujeet
#include<iostrream.h>
#include<conio.h>
void main()
{
int n;
cin>>n;
if(n==2)
{
cout<<"no is prime")
if(n%2!=0)
{
if(n%3!=0)
{
if(n%5!=0)
{
if(n%7!=if(n%2!=0)
{
0)
{
if(n%11!=0)
{
if(n%13!=0)
{
cout<<"no is prime ";
}
}
}
}
}
}
}
}
}
getch()
}
| Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What are operators in c?
What is huge pointer in c?
What is a stream in c programming?
What is a loop?
Why is c platform dependent?
Explain what math functions are available for integers? For floating point?
What is the difference between printf and scanf )?
Write a program to reverse a given number in c language?
When should the const modifier be used?
what is the different bitween abap and abap-hr?
Differentiate between static and dynamic modeling.
What does 2n 4c mean?
what are # pragma staments?
Can a pointer be null?
What are the different types of linkage exist in c?