Answer to Question #264541 in Algorithms for lhanz

Question #264541

Write an interactive program (algorithm and flowcharthat computes the area of rectangle ( area = base* height) and area of triangle ( area = 1 * base* height). Let the user choose what area to compute by prompting the first character of figure name (R-Rectangle or T - Triangle) then compute and print the desired result.

1
Expert's answer
2021-11-11T10:45:38-0500

input:

b \\ base

h \\ height

S \\ area

enter R or T

if R then

S=b*h

else if T then

S=0.5*b*h

output:

print S






Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS