TOPIC

wrong answer 50%

魂・・ asked 2 years ago

include include

void main() { int X,Z,n,i,c; i=1; scanf ("%d",&X); scanf ("%d",&Z); while (Z<X) { scanf ("%d",&Z); } c=X; if (X>0) { while (c<Z) { X++; c=c+X; i++; } printf ("%d\n",i); }

}

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

  • Marcos Couto replied 11 months ago

    Enquanto Z for menor ou igual a X.

     while (Z<=X)