Draw a flowchart that will accept the length of the base and height of a triangle and print
the area. Use the formula: Area = (base * height) / 2
Basic program to calculate area of triangle
Follow the instructions
Step1- input the base and height
Step2- calculate the base and height
Step3- by formula (1/2*b*h)
Step4- print area
just write what you would do
ask for base
read base
ask for height
read height
area = (base * height)/2
print area
To draw a flowchart that accepts the length of the base and height of a triangle and prints the area, follow these steps:
Step 1: Start
Step 2: Read the value of the base
Step 3: Read the value of the height
Step 4: Calculate the area using the formula: area = (base * height) / 2
Step 5: Print the calculated area
Step 6: End
Here is an example flowchart that represents this logic:
_____________
| |
---->| Start |------
|_____________|
|
______|_____
| |
v |
---->| Read base |
|____________|
|
______|_____
| |
v |
---->| Read height|
|____________|
|
______|_____
| |
v |
---->| Calculate |
| area |
|____________|
|
______|_____
| |
V |
---->| Print |
| area |
|____________|
|
______|_____
| |
<--- | End |
|____________|
Note that flowchart symbols may vary, but the overall structure and logic should remain the same.