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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!