Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++, I'm compiling mainly in Visual Studios Q1) Write a PROGRAM that has function named timesTen. The function should accept a double argument, and

In C++, I'm compiling mainly in Visual Studios

Q1) Write a PROGRAM that has function named timesTen. The function should accept a double argument, and return a double value that is ten times the value of the argument. Call the function in main and display the results to the screen.

Q2) Write a PROGRAM that has a function called findAverage that takes as arguments 4 integers and returns the average (a double). Call the function in main, ask the user for the 4 integers and then pass them to the function. After calling the function, display the average on the screen.

Q3) The distance a vehicle travels can be calculated as follows:

Distance = Speed * Time

Write a function named calDistance that accepts a vehicles speed and time as arguments, and returns the distance the vehicle has traveled. Call the function in main and display the results to the screen.

Q4) The formula for converting a temperature from Centigrade to Fahrenheit is:

F = 9\5 * C + 32

Where F is the Fahrenheit temperature and C is the centigrade temperature. Write a function named fahrenheit that accepts a centigrade temperature as an argument. The function should return the temperature, converted to Fahrenheit. Demonstrate the function (in main) by calling it in a loop that displays a table of the Centigrade temperature 0 through 20 and their Fahrenheit equivalents, i.e. call the function inside the loop!

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

c. What were you expected to do when you grew up?

Answered: 1 week ago

Question

5. If yes, then why?

Answered: 1 week ago

Question

3. What changes should I be making?

Answered: 1 week ago