TEMA

100% wrong why?

Tanjil Pranto preguntado 3 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;

}

Recuerda no enviar soluciones. Tu mensaje puede ser revisado por nuestros moderadores.

  • EngrJuelRana respondido 3 years ago

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

  • Janaina Jamarino Rosa respondido 3 years ago

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