Answer Posted / pramod k sharma
#include<iostream.h>
#include<conio.h>
main()
{
int n,i,f=1;
cout<<"enter any no to check prime";
cin>>n;
for(i=2;i<n;i++)
{
if(n%i==0)
k=2;
}
if(k==2)
cout<<"the no is not prime"<<endl;
else
cout<<"the no is prime";
}
getch();
| Is This Answer Correct ? | 14 Yes | 32 No |
Post New Answer View All Answers
Can union be self referenced?
Write about a nested class and mention its use?
To which numbering system can the binary number 1101100100111100 be easily converted to?
What is #include iostream?
What are member functions used in c++?
What is anonymous object in c++?
Do you know what are pure virtual functions?
How can an improvement in the quality of software be done by try/catch/throw?
Differences between private, protected and public and give examples.
Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened
Define whitespace in C++.
What is copy constructor? Can we make copy constructor private in c++?
What is c++ virtual inheritance?
What is c++ hiding?
What is insertion sorting?