write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / santhi perumal
#include<Stdio.h>
#include<conio.h>
int main()
{
int i,j, flag = 0;
for(i=2;i<=100;i++)
{
for(j=2;j<i;j++)
{
if(i != j)
{
if(i%j != 0)
continue;
else
break;
}
}
if(i == j)
printf("%d ",i);
}
}
| Is This Answer Correct ? | 52 Yes | 38 No |
Post New Answer View All Answers
How important is structure in life?
What functions are in conio h?
What is memory leak in c?
Is it possible to execute code even after the program exits the main() function?
What is auto keyword in c?
Why doesn't C support function overloading?
Which is best linux os?
What is binary tree in c?
Can we access the array using a pointer in c language?
Can we increase size of array in c?
What is #line used for?
What is boolean in c?
What are variables and it what way is it different from constants?
How we can insert comments in a c program?
What is function in c with example?