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
What is the keyword auto for?
give me an example for testing a program showing the test path .show how the test is important and complex.
daily Routine of father
Define a pdb file.
Write a Program for find and replace a character in a string.
What's the order in which the local objects are destructed?
What is a literal in c++?
Difference between overloading vs. Overriding
Explain the use of vtable.
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create
Is c++ a pure oop language?
If dog is a friend of boy, is boy a friend of dog?
Does c++ cost money?
Do you know what are the new features that iso/ansi c++ has added to original c++ specifications?
Can malloc be used in c++?