write the program for prime numbers?
Answer Posted / chetan mehra
#include<stdio.h>
#include<conio.h>
void main()
{
int x,y,z;
clrscr();
for(x=2; x<=50; x++)
{
for(y=2; y<x; y++)
{
if(x%y==0)
{
break;
}
}
if(x==y){
printf("%d\n",y);
}
}
getch();
}
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What is a memory leak? How to avoid it?
Explain about block scope in c?
What does the c in ctime mean?
what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9
Explain what is the difference between null and nul?
hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .
Describe newline escape sequence with a sample program?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Explain about C function prototype?
What does volatile do?
What is nested structure?
What is pivot in c?
What is the best way to comment out a section of code that contains comments?