Question
For a pyramid, a cone or a cylinder, their volumes can be computed from the parameters b, r and h, as shown below: Pyramid Cone
For a pyramid, a cone or a cylinder, their volumes can be computed from the parameters b, r and h, as shown below:
Pyramid | Cone | Cylinder |
Volume = 1 / 3 * b * h | Volume = 1/ 3 * pi * r * r h | Volume = pi * r * r * h |
Write an HLA Assembly language program that computes and then prints the volume of a pyramid, cone and cylinder based on a radius r, a length b and a height h by writing a function with the following signature:
procedure volumeFinder( r: real32; b : real32; h : real32 ); @nodisplay; @noframe;
A sample program dialogue is shown below.
Lemme calculate the volumes of various things! Gimme r: 1.0 Gimme b: 1.0 Gimme h: 1.0 Volume of a pyramid = 0.33333 Volume of a cone = 1.04719 Volume of a cylinder = 3.14159
Lemme calculate the volumes of various things! Gimme r: 1.0 Gimme b: 1.0 Gimme h: 3.0 Volume of a pyramid = 1.00000 Volume of a cone = 3.14159 Volume of a cylinder = 9.42477
Lemme calculate the volumes of various things! Gimme r: 2.0 Gimme b: 1.0 Gimme h: 3.0 Volume of a pyramid = 1.00000 Volume of a cone = 12.5663 Volume of a cylinder = 37.6991
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started