TOPIC

100% wrong why?

tpranto asked 6 years ago

include

int main(void) { int X,Y,i,s=0;

scanf("%d",&X);
scanf("%d",&Y);

for(i=X;i<=Y;i++)
{
    if(i%13!=0)
    {
        s=s+i;
    }
}
printf("%d\n",s);

return 0;

}

Remember not post solutions. Your post may be reviewed by our moderators.

  • EngrJuelRana replied 6 years ago

    the input maybe reversal order. so you have to sort them as increased order or ascending order. thats it. :)

  • Jamarino replied 6 years ago

    First, you have to put your variables x and y in ascending order.