Please write me a program to print the first 50 prime
numbers (NOT between the range 1 -50)
Answer Posted / azad sable, chiplun
void main()
{
int i,n=1;
clrscr();
printf("\nprime no. between 1 to50 are:\n1\t);
while(n<=50)
{
i=2;
while(i<n)
{
if(n%1==0)
break;
else
i++;
}
if(i==n)
printf("%d\t",n);
n++;
}
getch();
}
| Is This Answer Correct ? | 20 Yes | 34 No |
Post New Answer View All Answers
show how link list can be used to repersent the following polynomial i) 5x+2
What is the function of this pointer?
When is a “switch” statement preferable over an “if” statement?
What is a void pointer? When is a void pointer used?
Explain about C function prototype?
Which is better malloc or calloc?
Why is c not oop?
Array is an lvalue or not?
Do you know the purpose of 'register' keyword?
What are 3 types of structures?
What are identifiers in c?
How can you draw circles in C?
What is #line in c?
Can a variable be both constant and volatile?
In C language, a variable name cannot contain?