Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started