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 are called c variables?
Explain what does a function declared as pascal do differently?
What is .obj file in c?
What is non linear data structure in c?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
Where we use clrscr in c?
What is c language used for?
How does normalization of huge pointer works?
What is the difference between malloc calloc and realloc in c?
What is the incorrect operator form following list(== , <> , >= , <=) and what is the reason for the answer?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
What is the purpose of sprintf?
What are formal parameters?
What is putchar() function?
the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset