Question: Loops can be nested, this means putting one loop inside another. Build logic with these parts: Setup: create variables strt , prod , sm and
Loops can be nested, this means putting one loop inside another. Build logic with these parts:
Setup: create variables strt, prod, sm and sumofprod and assign an initial value of 0 to each
WHILE condition: create a while loop with a condition test like this (i <= 10)
Work: open curly-brace { to surround the work which includes...
Setup for an inner loop: create the variable j and assign an initial value of 1
While condition: create a while loop with a condition test like this (j<=6)
Work: open curly-brace { to surround the inner loop work which includes...
calculate prod to be i * j
calculate sm to be i + j
calculate sumofprod to be sumofprod + prod
calculate j to be j + 2
Close curly-brace } for the inner loop
calculate i to be i + 1
Close curly-brace } for the outer loop
After Party: This math was not really a great party, so no need for an After Party here. Once you build and run your logic, look at the value of variables in the environment area.
Match the values to their variables as they will be after this logic runs.
Question 5 options:
|
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
