Write a program to print the prime numbers from 1 to 100?
Answer Posted / dash
#include<stdio.h>
#include<conio.h>
void main()
{
int number,i;
clrscr();
for(i=1;i<=100;i++)
{
if(i%2==0)
{
printf("\n\n not prime number\t%d",i);
}
else
printf("\n\n prime number\t%d",i);
}
getch();
}
| Is This Answer Correct ? | 31 Yes | 86 No |
Post New Answer View All Answers
What is null in c?
Why do we need a structure?
a c code by using memory allocation for add ,multiply of sprase matrixes
What are the advantages of external class?
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
Write a program to print numbers from 1 to 100 without using loop in c?
What is the c value paradox and how is it explained?
What is difference between stdio h and conio h?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
What is #include cctype?
Explain what is the general form of a c program?
How can I insert or delete a line (or record) in the middle of a file?
State two uses of pointers in C?
What are different types of pointers?
What is the use of function in c?