write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / sureshbobra
#include<stdio.h>
#include<conio.h>
main()
{
int flag,i,j;
clrscr();
for(i=1;i<=100;i++)
{
flag=0;
for(j=2;j<=i;j++)
{
if(i%j==0)
{
flag++;
}
}
if(flag==1)
printf("%d\t",i);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 6 No |
Post New Answer View All Answers
What is oops c?
What is n in c?
What header files do I need in order to define the standard library functions I use?
What is the difference between ++a and a++?
#include
What is a void * in c?
Explain what is wrong with this statement? Myname = ?robin?;
What are the disadvantages of external storage class?
How many types of errors are there in c language? Explain
What is the scope of global variable in c?
What is function in c with example?
What is pointer in c?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
What does volatile do?
If I have a char * variable pointing to the name of a function ..