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
What are pragmas and what are they good for?
What is pointer in c?
Is printf a keyword?
Explain what is a pragma?
What is static and volatile in c?
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
What is ctrl c called?
Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)
Write the syntax and purpose of a switch statement in C.
What is an identifier?
What is difference between arrays and pointers?
Can you write the function prototype, definition and mention the other requirements.
What is echo in c programming?
What are keywords c?
Explain what header files do I need in order to define the standard library functions I use?