Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ please 2. (15 pts) Eunction with one retum value: Write a C++ function that returns volume of a sphere in cubie meters given the

C++ please image text in transcribed
image text in transcribed
image text in transcribed
2. (15 pts) Eunction with one retum value: Write a C++ function that returns volume of a sphere in cubie meters given the radius in meters. Write a main program that calls the function within a loop in order to print the radius and volume in a table as the radius varies from 1m to 10m. The table might appear as shown below: 3. (15 pts) Functions with one return value: Write a C++ program for Programming Exercise 6.9 (Conversions between Celsius and Fahrenheit) on page 254. The table produced should be shown exactly as in the text (use left justification for each column, use the number of digits after the decimal point shown in each column, show trailing zeros, ete) 4. (15 pts) Function with no retum values: Write a C+ program for Programming Exercise 6.11 on page 254. Test the program for the following cases: A) All upper case letters using 6 characters per line B) All lower case letters using 8 characters per line C) All characters from ' 1 ' to ' Z ' using 10 characters per line 6.9 (Comversions between Celsius and Fahrenheit) Write the following functions: 1/ Convert from Celsius to Fahrenheit double celsiusToFahrenheit(double celsius) 1/ Convert from Fahrenheit to Celsius double fahrenheitToCelsius(double fahrenheit) The formula for the conversion is fahrenheit =(9.0/5) celsius +32 celsius =(5.0/9)( fahrenheit 32) Write a test program that invokes these functions to display the following tables: (Display characters) Write a function that prints characters using the following header: void printChars(char ch1, char ch2, int numberPerLine) This function prints the characters between ch1 and ch2 with the specified number of characters per line. Write a test program that prints 10 characters per line from ' 1 ' and ' z '. Characters are separated by exactly one space

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

More Books

Students also viewed these Databases questions

Question

7. Explain why retirees may be valuable as part-time employees.

Answered: 1 week ago

Question

3. Provide advice on how to help a plateaued employee.

Answered: 1 week ago