Please write me a program to print the first 50 prime
numbers (NOT between the range 1 -50)
Answer Posted / azad sable, chiplun
void main()
{
int i,n=1;
clrscr();
printf("\nprime no. between 1 to50 are:\n1\t);
while(n<=50)
{
i=2;
while(i<n)
{
if(n%1==0)
break;
else
i++;
}
if(i==n)
printf("%d\t",n);
n++;
}
getch();
}
| Is This Answer Correct ? | 20 Yes | 34 No |
Post New Answer View All Answers
Explain the use of 'auto' keyword in c programming?
What is && in c programming?
Why & is used in scanf in c?
Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?
How can I copy just a portion of a string?
How many bytes is a struct in c?
What is n in c?
How can I recover the file name given an open stream?
Which function in C can be used to append a string to another string?
What is difference between far and near pointers?
Explain what does it mean when a pointer is used in an if statement?
i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical
What are the different types of constants?
int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above
Can you write the algorithm for Queue?