Hire a C++ Programmer

This project has been awarded to usamamw141 for $30 USD.

Get free quotes for a project like this
Employer working
Awarded to:
Skills Required
Project Budget
$30 - $250 USD
Total Bids
Project Description

Write one void function to cout the results for ONE TV size. It should have ONE, whole number parameter -- the diagonal measurement of a TV, like 42. It should use the C++ library formatting functions to make nicely-spaced columns.

One call to the function should produce output like this, with the diagonal measurement, width, height, and area, in that order:

42 36.6 20.6 754

Write three value-returning functions, each with one parameter: the diagonal measurement. Write one to calculate and return the width, another for the height, and another for the area (in square inches). Call these from the void function!

Call the void function from int main 5 times with different sizes of the user's choice AND include column headings, like this:

Enter the diagonal inches for 1st TV: 42

Enter the diagonal inches for 2nd TV: 50

Enter the diagonal inches for 3rd TV: 80

Enter the diagonal inches for 4th TV: 132

Enter the diagonal inches for 5th TV: 24

diagonal width height area

-------- ----- ------ ----

42 36.6 20.6 754

50 ? ? ?

80 ? ? ?

132 ? ? ?

24 ? ? ?

Format width and height with one decimal digit, and area with none. Submit the program as [url removed, login to view], spelled and cased exactly that way. Note that Canvas will add version-tracking to the file name in resubmissions .

You may write a function to cout the 2-line heading with columns names and underlines, or not -- your choice.

Name the functions and variables as you wish, as long as they are descriptive of what they do. For example:

double a(int k) // calculates width -- this won't do...

double width(int diagonal) // this is better!

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online