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
Differentiate abs() function from fabs() function.
write a program for the normal snake games find in most of the mobiles.
What is the purpose of type declarations?
Explain the process of converting a Tree into a Binary Tree.
How can I run c program?
How to delete a node from linked list w/o using collectons?
Can we declare variable anywhere in c?
Explain what could possibly be the problem if a valid function name such as tolower() is being reported by the c compiler as undefined?
What is the difference between union and anonymous union?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
What is the size of a union variable?
Write the control statements in C language
Explain void pointer?
How do you define structure?
how to print the character with maximum occurence and print that number of occurence too in a string given ?