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
Do you know the use of fflush() function?
Can you please explain the difference between syntax vs logical error?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is the use of f in c?
Which function in C can be used to append a string to another string?
What is hashing in c language?
Explain what is the advantage of a random access file?
Does * p ++ increment p or what it points to?
a c code by using memory allocation for add ,multiply of sprase matrixes
Why #include is used in c language?
in iso what are the common technological language?
What are the primitive data types in c?
Write the control statements in C language
What are structural members?
which of the following is allowed in a "C" arithematic instruction a) [] b) {} c) () d) none of the above