Question: Integers outerInput and innerInput are read from input. The inner while loop executes ( innerInput + 1 ) times for each iteration of the outer
Integers outerInput and innerInput are read from input. The inner while loop executes innerInput times for each iteration of the outer while loop. Complete the outer while loop to execute outerInput times.
Ex: If the input is then the output is:#include
using namespace std;
int main
int outerInput;
int innerInput;
int count;
int i;
int j;
cin outerInput;
cin innerInput;
count ;
i ;
while Your code goes here
j ;
while j innerInput
count;
j;
i;
cout "Inner loop ran count times" endl;
return ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
