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 storage class?
WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.
Can we declare variables anywhere in c?
How can I automatically locate a programs configuration files in the same directory as the executable?
void main(){ int a; a=1; while(a-->=1) while(a-->=0); printf("%d",a); }
Is c compiled or interpreted?
What's the best way of making my program efficient?
What is a program flowchart and explain how does it help in writing a program?
write a program to create a sparse matrix using dynamic memory allocation.
What is meant by gets in c?
What are the disadvantages of external storage class?
How do you determine whether to use a stream function or a low-level function?
Tell me can the size of an array be declared at runtime?
How can I read a binary data file properly?
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?