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 could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?
the question is that what you have been doing all these periods (one year gap)
What is masking?
What are the advantages of using linked list for tree construction?
What is merge sort in c?
What is the purpose of 'register' keyword?
In C programming, what command or code can be used to determine if a number of odd or even?
What is the use of pointers in C?
Can you add pointers together? Why would you?
What is indirection in c?
How do I convert a string to all upper or lower case?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
What is the difference between exit() and _exit() function in c?
Where is c used?
Explain how do you sort filenames in a directory?