Skip to main content

Design a Flowchart to add two numbers

Description

The flowchart starts with the "Start" symbol, initiating the algorithm. It then proceeds to declare three variables: n1, n2, and sum. The user inputs values for n1 and n2. Next, the algorithm calculates the sum of n1 and n2 using the operation sum = n1 + n2. The result is displayed to the user. Finally, the algorithm reaches the "Stop" symbol, signifying the end of the process.

Flowchart

What does this mean ?

  • Start: The Start symbol (usually an oval or rounded rectangle) indicates the beginning of the process. It initiates the algorithm and sets things in motion.
  • Declare Variables: This step involves declaring the necessary variables for the program. In a flowchart, this is often represented by a parallelogram symbol, signifying input or output. Variables n1, n2, and sum are declared to store values.
  • Read Input: In the flowchart, reading input is typically represented by a parallelogram symbol. It's the process of taking input from an external source. Here, we read the values of n1 and n2, likely from the user.
  • Calculate Sum: Calculation steps are usually represented by rectangles in a flowchart. In this case, we calculate the sum of n1 and n2, performing the operation sum = n1 + n2.
  • Display Output: Displaying output is another action typically represented by a parallelogram symbol. It's the process of showing results to the user. Here, we display the value of sum to the user.
  • Stop: The Stop symbol (often an oval or rounded rectangle) signifies the end of the process. It's the conclusion of the algorithm and halts further execution.

Learn more

Reference