Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed image text in transcribed image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

What are the benefits that common stockholders may receive?

Answered: 1 week ago