Question: f I write a loop that loops 20 times, and inside the loop adds 1 to a variable, then enclose all that in a loop
f I write a loop that loops 20 times, and inside the loop adds 1 to a variable, then enclose all that in a loop that loops 20 times, what am I adding to the variable in total, after all the loops.
int number = 0;
for(int i = 0; i < 20; i++) {
for(int j = 0; j < 20; j++) {
number = number + 1;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
