Draw a flowchart to accept two numbers, if the first number is greater than the second number, print their sum, otherwise print their product.
Answers
Answer:
1. start
2. input a,b
3. if a>b
4. print a+b
5. else
6. print a*b
7. stop
Explanation:
Concept introduction:
An illustration of a process' individual phases in chronological sequence is called a flowchart. It is a general tool that may be used for a wide range of tasks and to explain a number of processes.
Explanation:
Given that, the first number is greater than the second number
We have to find, flow chart to accept two numbers, if the first number is greater than the second number, print their sum, otherwise print their product.
According to the question,
Start
↓
Read two numbers A and B
↓
Is A>B? → Yes → Result= A+B
↓
No
↓
Result= A*B
↓
Display Result
↓
Stop
Final Answer:
We have to command as required step by step to get print of sum or product of two numbers.
#SPJ3