Question: A = 8 B = 2 Get A Get B STEP 1 If A or B = 0 Then Set Product to = 0 and

A =8 B =2
Get A
Get B
STEP 1 If A or B =0
Then Set Product to =0 and Go To STEP 3
Else Set Count to 0 and Set Product to 0 and Go To STEP 2
STEP 2 While Count < B
Set Product to (Product + A)
Set Count to (Count +1)
End of Loop;
STEP 3 Print the value of Product
STEP 4 Stop
After Iteration 1:
Count equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
Product equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
After Iteration 2:
Count equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
Product equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
After Iteration 3:
Count equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
Product equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
After Iteration 4:
Count equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]
Product equals [ Select ]["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20", "Loop Ended"]

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 Programming Questions!