Answer Posted / paramjeet singh
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,c;
printf("enter any number\n");
scanf("%d",&i);
printf("you have entered=%d\n",i);
for(c=2;c<=i-1;c++)
{
if(i%c==0)
printf("this no.is not a prime number");
}
printf("this is prime number");
getch();
}
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain abstraction.
What is an object in c++?
Is there any difference between int [] a and int a [] in c++?
Is it possible to pass an object of the same class in place of object reference to the copy constructor?
What is diamond problem in c++?
If dog is a friend of boy, is boy a friend of dog?
What is the use of endl in c++ give an example?
How do you flush a buffer in c++?
What is operators in c++?
Do you know the use of vtable?
What are the advantages of using pointers in a program?
What is the advantage of c++ over c?
Which programming language is best?
Difference between strdup and strcpy?
What is the latest c++ version?