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
in programming languages a statement or part of a statement that specifies several different execution sequences a) constructs b) distructs c) executes d) none
What is a far pointer in c?
a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor
What is masking?
What is the advantage of c?
How do I get an accurate error status return from system on ms-dos?
What is the role of && operator in a program code?
Can you assign a different address to an array tag?
What are the 4 types of organizational structures?
What is omp_num_threads?
What does %p mean?
Write program to remove duplicate in an array?
What are # preprocessor operator in c?
How do I use void main?
What does & mean in scanf?