the program is showing the output perfectly but the value of a
is printing more than once.
for example,
if i enter range from 10 to 20 , the output should be 11,13,17,19
but the output is 11,13,13,13,17,17,17,17,17,17,17,19,19,19,19,19,19,19,19,19
how can i fix this ?
int main(void)
{
int a,b,c,d,f;
clrscr ();
scanf ("%d",&a);
scanf ("%d",&b);
for (c=a;c<=b;c++)
{
for (d=2;d<b;d++)
{
{
f=c%d;
if (f==0)
break;
}
if (f!=0)
if (d>=a && d<=b)
printf ("%d",c);
}
}
getche ();
}