Write a program to print all the prime numbers with in the
given range
Answer Posted / chavidi
void prime(int a,int b)
{
int i,j,c
for(i=a;i<=b;i++)
{
c=0;
for(j=1;j<=a;j++)
{
if(a%j==0)
{
c++;
}
}
if(c==2)
printf(i);
}
}
| Is This Answer Correct ? | 8 Yes | 14 No |
Post New Answer View All Answers
What is adt in c programming?
What is array of structure in c?
What is pointers in c?
Explain how can I convert a number to a string?
What language is lisp written in?
What is data structure in c programming?
Explain c preprocessor?
Do you know what are the properties of union in c?
can anyone suggest some site name..where i can get some good data structure puzzles???
List the difference between a "copy constructor" and a "assignment operator"?
What do you mean by recursion in c?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.
What’s a signal? Explain what do I use signals for?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above