write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / jigar
#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,f;
clrscr();
for(n=1;n<=100;n++)
{
f=0;
for(a=2;a<n;a++)
{
if(n%a==0)
{
f=1;
break;
}
}
if(f==0)
printf("%d",n);
}
getch();
}
// JIGAR SHOBHANA (ANIDA VACHHARA-GONDAL)
Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
What is pointer in c?
What are types of structure?
How can I make sure that my program is the only one accessing a file?
what is bit rate & baud rate? plz give wave forms
Why c is called procedure oriented language?
what are bit fields? What is the use of bit fields in a structure declaration?
Explain how many levels deep can include files be nested?
What do you mean by keywords in c?
Implement bit Array in C.
What is wrong with this program statement?
What is identifier in c?
What does char * * argv mean in c?
how do you programme Carrier Sense Multiple Access
What are the header files used in c language?
How can you determine the size of an allocated portion of memory?