Please write me a program to print the first 50 prime
numbers (NOT between the range 1 -50)
Answer Posted / pirya
#include<stdio.h>
#include<conio.h>
void main()
{
int count==0,n=0,i=1,j=1;
clrscr();
while(n<50)
{
j=1;
count=0;
while(j<=1)
{
if(count%i==0)
count++;
j++;
}
if(count==2)
{
printf("%d ",i);
n++;
}
i++;
}
getch();
}
| Is This Answer Correct ? | 13 Yes | 15 No |
Post New Answer View All Answers
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What are compound statements?
How can I recover the file name given an open stream?
How can you increase the allowable number of simultaneously open files?
What is time complexity c?
What are dangling pointers? How are dangling pointers different from memory leaks?
Is main an identifier in c?
What is the purpose of sprintf() function?
Explain pointer. What are function pointers in C?
program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)
What does struct node * mean?
What is formal argument?
Why does everyone say not to use scanf? What should I use instead?
What is the difference between arrays and pointers?
What is clrscr in c?