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
Tell me when would you use a pointer to a function?
How old is c programming language?
Under what circumstances does a name clash occur?
Is c still used?
What is return type in c?
Can the sizeof operator be used to tell the size of an array passed to a function?
What is console in c language?
What are Macros? What are its advantages and disadvantages?
c program for searching a student details among 10 student details
How can I find out if there are characters available for reading?
What are bitwise shift operators in c programming?
What is the difference between functions abs() and fabs()?
What is meant by realloc()?
Explain how can you tell whether two strings are the same?
can any one tel me wt is the question pattern for NIC exam