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
differentiate built-in functions and user – defined functions.
How can you be sure that a program follows the ANSI C standard?
What is equivalent to ++i+++j?
What is a union?
What are register variables? What are the advantage of using register variables?
What are the usage of pointer in c?
Is malloc memset faster than calloc?
main() { struct s1 { char *str; struct s1 *ptr; }; static struct s1 arr[] = { {"Hyderabad",arr+1}, {"Bangalore",arr+2}, {"Delhi",arr} }; struct s1 *p[3]; int i; < BR> for(i=0;i<=2;i++) p[i] = arr[i].ptr; printf("%s ",(*p)->str); printf("%s ",(++*p)->str); printf("%s ",((*p)++)->str); }
What are enums in c?
Is boolean a datatype in c?
Write a program to check armstrong number in c?
Define Array of pointers.
How can you restore a redirected standard stream?
Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014 Npu university
What is static identifier?