Skip to main content

Design a Flowchart to find Largest of 3 numbers

Description

The flowchart explains a program's structure for finding the largest among three numbers. It begins by declaring variables (n1, n2, n3, and MAX) and initializing MAX with n1. The program then takes user input for n1, n2, and n3. It compares n2 and n3 with MAX, updating MAX if necessary. Finally, it displays the largest value (MAX) and ends the process.

Flowchart

What does this mean ?

  • START → The Start symbol indicates the beginning of the process.
  • VARIABLE DECLARATION → This step is used to declare the variables: n1, n2, n3, and MAX. Variables are introduced to store values during the program execution.
  • USER INPUT PROMPT → In this step, the program prompts the user to input values for n1, n2, and n3. The entered values are stored in their respective variables.
  • INITIALIZE MAX → The program sets the initial value of MAX by assigning the value of n1 to it.
  • COMPARE n2 TO MAX → Compares the value of n2 with MAX to determine the largest so far. If n2 is greater, MAX is updated.
  • COMPARE n3 TO MAX → Compares the value of n3 with MAX to determine the overall largest number. MAX is updated if needed.
  • DISPLAY MAX → The program displays the largest value (MAX) to the user.
  • END → The End symbol indicates the conclusion of the program's execution

Learn more

Reference