Flowchart to add two numbers
Let’s design the flowchart to add two numbers and implement the algorithm from lesson 1.
Start Flowgorithm software.
Save the flowchart. ( for example: AddTwoNumber.fprg )
Add two Declare symbols to the flowchart. Create two variables, num1 and num2, of type Real.
Declare another variable result of type Real to store the sum of the two numbers.
Add two Output symbols to the flowchart to prompt the user to input.
Add two Input symbols to the flowchart to take input for the num1 and num2 variables.
The flowchart should look like below:
The first prompt will take the input and store the data in the variable num1.
The second prompt will take the input and store the data in the variable num2.
Add an Assign symbol to the flowchart. This will store the sum of the two numbers.
result <- (num1 + num2 )
Add an Output symbol to output the result to the console screen.
Â
Â
Save the flowchart.
Run the flowchart and enter two numbers. Check the output of the flowchart.
Flowchart Sample Output
Â