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
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
What is c language and why we use it?
What is the use of c language in real life?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
Write a program to identify if a given binary tree is balanced or not.
What does sizeof function do?
Explain what is a program flowchart and explain how does it help in writing a program?
Why is c still so popular?
What is the correct code to have following output in c using nested for loop?
What is maximum size of array in c?
What is a program flowchart?
Which of these functions is safer to use : fgets(), gets()? Why?
diff between exptected result and requirement?
What is the size of enum in bytes?
What is the general form of #line preprocessor?