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
What is the difference between malloc calloc and realloc in c?
When should I declare a function?
What does c mean in basketball?
how to make a scientific calculater ?
What is main () in c language?
How can you pass an array to a function by value?
What are the functions to open and close the file in c language?
How can you tell whether two strings are the same?
explain how do you use macro?
Why is extern used in c?
What are the functions to open and close file in c language?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Using which language Test cases are added in .ptu file of RTRT unit testing???
What is the general form of #line preprocessor?
What is far pointer in c?