program proc2; uses crt; {-------------------------------------------------------------------------- Computes the amount of paint needed to paint a room. by --------------------------------------------------------------------------} VAR l,w,h,area1,area2,cans:real; quit : char; procedure input; begin write ('What is the length of the room you want to paint, in feet? ---> '); readln (l); writeln; write ('What is the width of the room, also in feet? ---> '); readln (w); writeln; write ('And finally, what is the height of the walls? ---> '); readln (h); end; procedure calculations; begin area1 := l * h * 2; area2 := w * h * 2; area2 := area1 + area2; cans := area2 / 250 ; end; procedure output; begin writeln; writeln; writeln ('If a can of paint covers about 250 square feet, then you will need'); writeln ('about ',cans:0:2,' 1 gallon cans of paint.'); end; begin repeat clrscr; input; calculations; output; writeln; writeln; write ('Do you want to quit? (type Y or N) ---> '); quit := readkey; quit := upcase(quit); until quit = 'Y'; end.