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 c system32 taskhostw exe?
Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..
Disadvantages of C language.
Which function in C can be used to append a string to another string?
What is the difference between malloc() and calloc()?
What is a constant?
Can we increase size of array in c?
What is c programing language?
Tell us two differences between new () and malloc ()?
What is typedef example?
What are predefined functions in c?
What is an operator?
How are pointers declared in c?
Differentiate between Macro and ordinary definition.
any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above