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 the meaning of c in c language?
Explain the process of converting a Tree into a Binary Tree.
How do I determine whether a character is numeric, alphabetic, and so on?
What is the use of sizeof () in c?
Explain what is the concatenation operator?
What is difference between structure and union with example?
c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above
Can you return null in c?
Write a program to reverse a given number in c language?
How many types of functions are there in c?
Which is the memory area not included in C program? give the reason
Explain what is a const pointer?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What are the 3 types of structures?
Explain high-order and low-order bytes.