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
What is the difference between break and continue?
What is #line?
what is the difference between 123 and 0123 in c?
What are the key features in c programming language?
What is a structure in c language. how to initialise a structure in c?
In a byte, what is the maximum decimal number that you can accommodate?
What is methods in c?
In c programming language, how many parameters can be passed to a function ?
How do I get an accurate error status return from system on ms-dos?
How can a program be made to print the line number where an error occurs?
how to find anagram without using string functions using only loops in c programming
What is the difference between typedef and #define?
how can use subset in c program and give more example
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
What is the difference between text and binary modes?