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 are called c variables?
formula to convert 2500mmh2o into m3/hr
Why does everyone say not to use scanf? What should I use instead?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
Is it acceptable to declare/define a variable in a c header?
What are the advantages of using linked list for tree construction?
When is the “void” keyword used in a function?
How to delete a node from linked list w/o using collectons?
If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above
Who is the main contributor in designing the c language after dennis ritchie?
Describe the header file and its usage in c programming?
With the help of using classes, write a program to add two numbers.
Write a program to identify if a given binary tree is balanced or not.
Can you define which header file to include at compile time?