Answer Posted / indu
#include<stdio.h>
#include<conio.h>
main()
{
int n,s=0,i;
clrscr();
printf("Enter the number\n");
scanf("%d",&n);
for(i=2;i<n/2;i++)
{
if(n%i==0)
s++;
}
if(s>=1)
printf("%d is not prime",n);
else
printf("%d is prime",n);
getch();
}
ill execute it .it's cent percent correct.
| Is This Answer Correct ? | 40 Yes | 22 No |
Post New Answer View All Answers
What is public, protected, private in c++?
What is a tuple c++?
Where must the declaration of a friend function appear?
How do you flush a buffer in c++?
How is c++ used in the real world?
Should the this pointer can be used in the constructor?
What do you understand by zombie objects in c++?
What is the role of static keyword for a class member variable?
What is algorithm in c++ programming?
what is c++
Describe delete operator?
What is the first name of c++?
What is virtual base class uses?
What are function prototypes?
What is an accessor in c++?