1.
Q6: What is the value of
total
after the execution of the folowing code?int total = 0;
for (int x = 50; x >= 0; x = x - 5) {
total += x;
}
- 50
- 0
- 5
- 270
- 275
total
after the execution of the folowing code?int total = 0;
for (int x = 50; x >= 0; x = x - 5) {
total += x;
}
for (int y = 0; y < 10; y++) {
System.out.print(y * y + " ");
}
for (int y = 100; y < 10; y--) {
System.out.println(y);
}