Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need it in C language Please follow the prompt above for the user prompts and needs with formatting but the output should look something like

Need it in C language image text in transcribed Please follow the prompt above for the user prompts and needs with formatting but the output should look something like this: Enter a length in meters: user input Enter a width in meters: user input Enter location type: user input Area= x Perimeter= y Diagonal= z Value= $$$$

1. Asks the user for the length [m], width [m], and location type [1 = city, 2 = suburban, 3 = rural] of a plot of land. 2. Uses functions to compute the following parameters: a. Area - area of the plot in meters. b. Perimeter - perimeter in meters. c. Diagonal length of a diagonal across the plot, in meters. d. Value total value of the land, computed as the area times the price. The price is $1000/m2 in a city, $500/m2 in the burbs, and $100/m2 in rural areas. 3. Prints these parameters, formatted such that the area, perimeter, and diagonal each show 1 decimal place, while the land value has no decimal places, but has a leading $. 4. Your functions must match the declarations shown below. i. float compute Area(float length, float width); ii. float computePerimeter(float length, float width); iii. float computeDiagonal(float length, float width); iv. float computeValue(float area, int location Type)

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

Practical Issues In Database Management A Refernce For The Thinking Practitioner

Authors: Fabian Pascal

1st Edition

0201485559, 978-0201485554

More Books

Students also viewed these Databases questions

Question

3. What are potential solutions?

Answered: 1 week ago