Q:

What is the output of the following flowchart if my choice is 3 and num1=12 and num2=15? Explain with reason.

0

 

What is the output of the following flowchart if my choice is 3 and num1=12 and num2=15? Explain with reason.

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

-----------------------

Output:

180

 

Explanation:

--------------

First when the program starts list of operations will be displayed and these operation listed with numbers as :

1.Addition

2.Subtraction

3.Multiplication

4.Division

 

Then the program askes to enter a choice(a choice from the operations) and two numbers. In this case when my choice is 3 and num1=12 and num2=15. The program will check if my choice is equal to 1. Is 3 equal to 1 ? obviously no, then the program goes to the next condition and check if my choice is equal to 2. Is 3 equal to 2? no, then the program goes to the next condition and check if my choice is equal to 3. Is 3 equal to 3 ? its yes. Then the program will do multiplication operation in which result = num1*num2, result = 12*15=180. Then it will display result which contains the result of the multiplication and then program will stop.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now