Computer Science, asked by prabhalamsal01, 6 months ago

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

Answered by Anonymous
0

Answer:

How can I write an algorithm and draw a flow chart that reads the base and height of a triangle from the keyboard and prints the area of the triangle?

Is PrepBytes really helpful?

The answer is Yes. At present, I am enrolled into 100 day Expert Coder course and I am finding it really Helpful. They are prepar

I read an answer to this question which denied the answer to this question.

I will give an answer to this question but make it a learning experience because i know if i don't provide you with the answer, somebody will. We are pretty resourceful. Aren't we?

So, lets begin.

Every solution has 3 basic components:-

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.

Similar questions