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
Is main an identifier in c?
Explain can static variables be declared in a header file?
Can true be a variable name in c?
Can you explain the four storage classes in C?
diff between exptected result and requirement?
Write a program in c to replace any vowel in a string with z?
What are the different categories of functions in c?
What is nested structure?
Why clrscr is used in c?
how can i access hard disk address(physical address)? are we access hard disk by using far,near or huge pointer? if yes then please explain.....
What is the difference between malloc calloc and realloc in c?
In c language can we compile a program without main() function?
.find the output of the following program? char*myfunc(char*ptr) { ptr +=3; return (ptr); } int main() { char*x,*y; x="HELLO"; y=myfunc(x); printf("y = %s ",y); return 0; }
What is file in c language?
In C programming, how do you insert quote characters (‘ and “) into the output screen?