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
Eplain extern keyword?
What is a terminating character in c++?
What does asterisk mean in c++?
Can you help me with this one? Make a program that when a user inputed a Product Name, it will display its price, and when the user inputed the quantity of the inputed product, it will show its total price. The output must be like this: Product Name: Price: Quantity: Total Price: ..this is the list of products to be inputed: Cellphone - 1500 Washing Machine - 5200 Television - 6000 Refrigirator - 8000 Oven - 2000 Computer - 11000 thanks..:D
Explain how the virtual base class is different from the conventional base classes of the opps.
What is long in c++?
How a new element can be added or pushed in a stack?
What is the use of structure in c++?
why is c++ called oops? Explain
Write a program which uses Command Line Arguments
How do you import payscale data from non SAP to SAP?is it through LSMW or any other way is there?
Explain shallow copy?
What is the insertion operator and what does it do?
Which programming language is best?
What is the best c c++ compiler for windows?