Write an algorithm, draw a
flowchart and then write a program
to find the area of a triangle. Accept
the values of base and height from the
user.
Answers
Answered by
3
Explanation:
I hope this answer can help you
Attachments:

Answered by
4
Input -> processing-> output
Let us consider our 3 steps.
INPUT- we need b,h(2 variables to store base and height of triangle) as input.
PROCESSING- We need to calculate the area of our triangle.
OUTPUT- We need to print the value of the variable area to the console.
So, firstly read the values of b and h. Check if they aren't zero as we do not want our area to be zero. If they aren't zero, process the value of area with the formula of the area of a triangle.
Area=0.5*b*h
Now, print the value of area to the console.
The algorithm may be created as follows.
Attachments:

Similar questions