In this tutorial, we will learn to design a flowchart to calculate the triangle area. This Flowgorithm Example uses the below Flowgorithm flowchart symbols:
To know more about Flowgorithm flowchart symbols:
Given the base of the triangle and the height of the triangle,
We can calculate the triangle area as follows:
Triangle Area = 1/2*base*height
Let’s declare two variables to hold the input values the triangle base and the height of the triangle.
We will compute the area of the triangle. Let’s declare another variable called area to hold the computed value of the area of the triangle.
The Declare flowchart symbols are used to declare the variables in the flowchart. The data types of the three variables are of the type Real.
We will prompt the user to enter the values of the input variables. We use the output flowchart symbols to prompt the user to enter the values of the triangle base and height.
The area computation is done using an Assign flowchart symbol.
The flowchart to calculate the triangle area given the base and height is as follows:
Let’s run the flowchart and verify the output.
That’s it. We have created a simple Flowgorithm flowchart to calculate the area of the triangle.
Flowgorithm flowchart tutorials on this website:
For more information on the Flowgorithm tool, please visit the official website at: