write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / shravani
void main()
{
int i,num=1;
clrscr();
while(num<=100)
{ i=2; while(i<=num)
{ if(num%i==0)
break;
i++; }
if(i==num)
printf("\n%d is Prime",num);
num++;
}
getch();
}
Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
Differentiate between Macro and ordinary definition.
Explain bitwise shift operators?
Why use int main instead of void main?
Is c is a low level language?
What is the use of a static variable in c?
Why do we use header files in c?
how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software
What is the size of structure pointer in c?
What is the difference between local variable and global variable in c?
What is zero based addressing?
application attempts to perform an operation?
What is the best style for code layout in c?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
What are the loops in c?
What are the different file extensions involved when programming in C?