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 is the usage of the pointer in c?
Is c++ based on c?
what is the syallabus of computer science students in group- 1?
What does #pragma once mean?
1. Write a function to display the sum of two numbers in the following ways: By using (i) pass by value (ii) pass by address a. function with argument and with return value b. function with argument and without return value c. without argument , with return value d. without argument , without return value Note: Use pass by address.
What is the difference between constant pointer and constant variable?
What is #include called?
what are the 10 different models of writing an addition program in C language?
Explain what is the difference between far and near ?
What is the translation phases used in c language?
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
What do you mean by recursion in c?
What does 1f stand for?
What is the use of getch ()?
Who developed c language?