Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a 64-bit x86 assembly language program that computes the surface area and volume of a cone in square cm and cubic cm respectively.

1. Write a 64-bit x86 assembly language program that computes the surface area and volume of a cone in square cm and cubic cm respectively. The program has the main procedure and a procedure computeResults. The main procedure prompts for and reads the radius r and the length l of the slant side of the cone both in cm, it then passes these two values to the computeResults procedure. It finally prints the values returned by the computeResults procedure. The computeResults procedure receives the radius r and the length l of the slant side of the cone, it then returns the surface area and the volume of the cone.

image text in transcribed

volume - T Note: Your program must define a variable Pl with a value of 3.141592 .The computeResults procudure must not contain scanf or printf statements; the printing of the results must be in the main procedure. The main procedure must display an appropriate error message and terminate if the input is invalid. Sample program runs: Enter the radius [cm] and the slant 1ength [cm] of the cone: 7.00 -8.00 Error: Invalid input Enter the radius [cm] and the slant 1ength [cm] of the cone: 8.50 6.00 Error: Invalid input Enter the radius [cm] and the slant length [cm] of the cone: 3.50 7.56 Area-121.61 square cm Volume 85. 96 cubic cm volume - T Note: Your program must define a variable Pl with a value of 3.141592 .The computeResults procudure must not contain scanf or printf statements; the printing of the results must be in the main procedure. The main procedure must display an appropriate error message and terminate if the input is invalid. Sample program runs: Enter the radius [cm] and the slant 1ength [cm] of the cone: 7.00 -8.00 Error: Invalid input Enter the radius [cm] and the slant 1ength [cm] of the cone: 8.50 6.00 Error: Invalid input Enter the radius [cm] and the slant length [cm] of the cone: 3.50 7.56 Area-121.61 square cm Volume 85. 96 cubic cm

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

Spatial Database Systems Design Implementation And Project Management

Authors: Albert K.W. Yeung, G. Brent Hall

1st Edition

1402053932, 978-1402053931

More Books

Students also viewed these Databases questions