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
What are the key features in c programming language?
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
How was c created?
What is a macro, and explain how do you use it?
can anyone please tell about the nested interrupts?
What are the types of data types and explain?
Explain what are preprocessor directives?
How can you find out how much memory is available?
What is the argument of a function in c?
What is maximum size of array in c?
What is the full form of getch?
Explain what is the use of a semicolon (;) at the end of every program statement?
write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)
Tell us the use of fflush() function in c language?
What is difference between structure and union?