Answer Posted / rama
#include<stdio.h>
main()
{
int n,i,r;
clrscr();
printf("Enter the positive integer value");
scanf("%d",&n)
i=2;
step1:
if(i<=sqrt(n))
{
r=n%i;
if(r==0)
{
printf("%d is not a prime",n);
goto end;
}
}
else
{
i++;
goto step1;
}
printf("%d is prime number",n);
end:
printf(" ");
}
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
What is general form of pure virtual function? Explain?
Why is c++ so fast?
Is sorted c++?
Can there be at least some solution to determine the number of arguments passed to a variable argument list function?
What is srand c++?
Explain terminate() function?
What is a character in c++?
Is c++ vector a linked list?
What is c++ try block?
Do class declarations end with a semicolon? Do class method definitions?
What are the new features that iso/ansi c++ has added to original c++ specifications?
What is size_type?
What kind of problems can be solved by a namespace?
What is the use of namespace std in C++?
What are the general quetions are in DEna bank manager IT/System interviews?