# 1. Ocean Levels Assuming the ocean's level is currently rising at about 1.5 millimeters per year, write...

## Question:

1. Ocean Levels Assuming the ocean's level is currently rising at about 1.5 millimeters per year, write a program that displays: • The number of millimeters higher than the current level that the ocean's level will be in 5 years. • The number of millimeters higher than the current level that the ocean's level will be in 7 years. • The number of millimeters higher than the current level that the ocean's level will be in 10 years.

2. Total Purchase A customer in a store is purchasing five items. The prices of the five items are as follows: Price of item 1 = $15.95 Price of item 2 = $24.95 Price of item 3 = $6.95 Price of item 4 = $12.95 Price of item 5 = $3.95 Write a program that holds the prices of the five items in five variables. Display each item's price, the subtotal of the sale, the amount of sales tax, and the total. Assume the sales tax is 7 percent.

3. Cyborg Data Type Sizes You have been given a job as a programmer on a Cyborg supercomputer. In order to accomplish some calculations, you need to know how many bytes the following data types use: char, int, float, and double. You do not have any technical documenta-tion, so you can't look this information up. Write a C++ program that will determine the amount of memory used by these types and display the information on the screen.

4. Miles per Gallon A car holds 15 gallons of gasoline and can travel 375 miles before refueling. Write a program that calculates the number of miles per gallon the car gets. Display the result on the screen. Hint: Use the following formula to calculate miles per gallon (MPG): MPG 5 Miles Driven/Gallons of Gas Used 11. Distance per Tank of Gas A car with a 20-gallon gas tank averages 23.5 miles per gallon when driven in town, and 28.9 miles per gallon when driven on the highway. Write a program that calculates and displays the distance the car can travel on one tank of gas when driven in town and when driven on the highway. Hint: The following formula can be used to calculate the distance: Distance 5 Number of Gallons 3 Average Miles per Gallon 12. Land Calculation One acre of land is equivalent to 43,560 square feet. Write a program that calculates the number of acres in a tract of land with 391,876 square feet.

**Related Book For**

## Auditing a risk based approach to conducting a quality audit

ISBN: 978-1133939153

9th edition

Authors: Karla Johnstone, Audrey Gramling, Larry Rittenberg

**Posted Date:**