Write a Flowchart and a hierarchy chart of a program that inputs two different numbers and outputs the larger number followed by the message “This is the largest number”

To create a flowchart and a hierarchy chart for a program that accepts two different numbers and outputs the larger number with the accompanying message, follow the steps below:

1. Start by identifying the main logic of the program. In this case, the program needs to compare the two numbers and determine which one is larger.

2. Begin by drawing a rectangle, which represents the start of the program.

3. Next, draw an input symbol (usually a parallelogram) to indicate that the program requires two different numbers as input.

4. Connect the input symbol to a decision symbol (usually a diamond). Label the decision symbol "Is number1 larger than number2?"

5. From the decision symbol, draw two arrows labeled "Yes" and "No". The "Yes" arrow will lead to an output symbol (usually a rectangle), while the "No" arrow will lead to a separate decision symbol.

6. Label the output symbol as "Output number1 - This is the largest number."

7. Connect the output symbol to an end symbol (usually an ellipse), indicating the program's termination.

8. For the "No" path, draw a decision symbol labeled "Is number2 larger than number1?".

9. From the second decision symbol, draw two arrows labeled "Yes" and "No".

10. For the "Yes" arrow, connect it to a new output symbol labeled "Output number2 - This is the largest number."

11. Connect the output symbol to the end symbol.

12. For the "No" arrow, connect it to an output symbol labeled "Both numbers are equal - There is no larger number."

13. Connect the output symbol to the end symbol.

Using these steps, you can create a flowchart illustrating the logic of the program. Additionally, you can create a hierarchy chart to represent the program's structure, which will consist of main function and other supporting functions if applicable.