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
Explain the concept and use of type void.
Which is better oop or procedural?
What is the role of && operator in a program code?
my project name is adulteration of chille powder.how can i explain it to the hr when he asks me about the project?
What is pointer & why it is used?
What is storage class?
What is a pointer and how it is initialized?
What is the description for syntax errors?
Tell me is null always defined as 0(zero)?
Explain why C language is procedural?
How do you convert strings to numbers in C?
What should malloc() do?
Why flag is used in c?
The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration
How can a number be converted to a string?