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 are the different types of objects used in c?
Tell me can the size of an array be declared at runtime?
What is pointer in c?
Why & is used in scanf in c?
What are the Advantages of using macro
Are enumerations really portable?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
What are the types of data types and explain?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
What are different types of variables in c?
Explain what standard functions are available to manipulate strings?
List the different types of c tokens?
Does c have enums?
What are data structures in c and how to use them?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?