write a Program to dispaly upto 100 prime numbers(without
using Arrays,Pointer)
Answer Posted / santhi perumal
#include<Stdio.h>
#include<conio.h>
int main()
{
int i,j, flag = 0;
for(i=2;i<=100;i++)
{
for(j=2;j<i;j++)
{
if(i != j)
{
if(i%j != 0)
continue;
else
break;
}
}
if(i == j)
printf("%d ",i);
}
}
| Is This Answer Correct ? | 52 Yes | 38 No |
Post New Answer View All Answers
what is different between auto and local static? why should we use local static?
What is a ternary operator in c?
What is the sizeof () a pointer?
What is a MAC Address?
disply the following menu 1.Disply 2.Copy 3.Append; as per the menu do the file operations 4.Exit
If null and 0 are equivalent as null pointer constants, which should I use?
What does c mean before a date?
Explain spaghetti programming?
With the help of using classes, write a program to add two numbers.
What is the difference between new and malloc functions?
Explain what does the format %10.2 mean when included in a printf statement?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
How to get string length of given string in c?
Dont ansi function prototypes render lint obsolete?
Why we use int main and void main?