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
How to throw some light on the b tree?
Differentiate between declaring a variable and defining a variable?
Explain what is the difference between text files and binary files?
If jack lies on Mon, Tue Wed and jill lies on Thursday, Friday and Saturday. If both together tell they lied yesterday. So c the given options and then c cos in the given dates one will be saying the truth and one will be lying. I got Thursday as option because jack is saying the truth he lied yest but jill is lying again as he lies on that day.
What is pass by reference in c?
How can variables be characterized?
What is meant by realloc()?
What are the types of type specifiers?
Multiply an Integer Number by 2 Without Using Multiplication Operator
difference between native and cross compilers
cin.ignore(80, _ _);This statement a) ignores all input b) ignores the first 80 characters in the input c) ignores all input till end-of-line d) iteration
What is the meaning of 2d in c?
In c language can we compile a program without main() function?
What is the difference between array and pointer in c?
Why do we use null pointer?