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 reserved words with a programming language?
What does typedef struct mean?
What is modeling?
How can a string be converted to a number?
What is string function c?
How do I round numbers?
Write a program that accept anumber in words
Explain why can’t constant values be used to define an array’s initial size?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Is that possible to store 32768 in an int data type variable?
Why isn't it being handled properly?
Is stack a keyword in c?
What is the difference between #include and #include 'file' ?
How can you increase the allowable number of simultaneously open files?
What are loops in c?