TOPIC

wrong answer 10%

RAFAEL asked 6 months ago

include include

int main (){ int i =0, m[10000],n[10000],aux,j, seq,sum; for(;;i++){ scanf ("%d %d", &m[i],&n[i]); if (m[i]<=0 || n[i]<=0)break; if (m[i]>n[i]){ aux=m[i]; m[i] = n[i]; n[i]=aux; } } j=i; for (i=0;i<=j;i++){ seq=m[i]; sum=0; while (seq<=n[i]){ printf ("%d ",seq); sum = sum + seq; seq++; } if (m[i]<=n[i])printf ("Sum=%d\n",sum); } return 0;

}

This topic has not been answered yet. Be the first!

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