Write the algorithm and flowchart for the following:
To input the length, breadth and height of a room and calculate its area and volume.
Answers
Explanation:
First off, you gotta write down what you have and what you wanna find. You wanna write an algorithm and draw a flowchart. About what? The area of a triangle. What do you need for that? Base and height.
So you’ve got that already, and then there’s this equation over here:
Area of triangle = (base * height) / 2
That’s it. But where to start?
Well, first, you gotta ask for the base and height of your triangle. We store them, say, base in variable ‘b’ and height in variable ‘h’.
So we send those variable boxes to the processing station where we know a dude who’ll find the area for us, disguised as variable ‘a’.
He found our guy so all that’s left now is to inform the dude who was originally asking for area and gave us base and height, area’s two main dudes.
Basically…
Input ‘base’.
Input ‘height’.
area=(base*height)/2
Output ‘area’.
my brain is currently swimming in weird brain goop. please excuse the mistakes. ; -