0
Please any explain me, why total 38 in here
int x = 1, y, total = 0; for (x=4; total < 36; x = x - 1){ y = x * x; total = total + x + y; } System.out.printf(“The total is: %d”, total); Total=38
2 Respuestas
+ 1
Check out this helper code - I added console prints that should clear things up
Included comments for clarification
https://code.sololearn.com/cU2N7lVD0Tq2/?ref=app
0
Tnx a lot🙏🙏