1. Write a program that prompts the user for two integers and then prints The sum The difference The product The average The distance (absolute value of the difference) The maximum (the larger of the two ) The minimum (the smaller of the two) ______________________________________________________________________________ 2. Write a program that prompts the user for a measurement in meters and then converts it into miles, feet and inches. _______________________________________________________________________________ 3. Write a program that prompts the user for a radius and then prints The area and circumference of the circle with that radius The volume and surface area of the sphere with that radius ______________________________________________________________________________ 4. Write a program that asks the user for the lengths of the sides of a rectangle. Then print The area and perimeter of the rectangle The length of the diagonal (use the Pythagorean theorem) ______________________________________________________________________________ 5. (Giving change) Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received from the customer. Compute the difference, and compute the dollars, quarters, dimes, nickels, and pennies that the customer should receive in return. Hint: 1. First transform the difference into an integer balance, denominated in pennies. 2. Then compute the whole dollar amount. 3. Subtract it from the balance. 4. Compute the number of quarters needed. 5. Repeat for dimes and nickels. 6. Display the remaining pennies. ______________________________________________________________________________ 6. Write a program that asks the user to input The number of gallons The fuel efficiency The price per gallon Then print how far the car can go with the gas in the tank and print the cost per 100 miles. ______________________________________________________________________________ 7. Write a program that reads two times in military format (0900, 1730) and prints the number of hours and minutes between the two times. Here is a sample run. Please enter the first time: 0900 Please enter the second time: 1730 8 hours 30 minutes Extra credit if you can deal with the case that the first time is later than the second time: Please enter the first time: 1730 Please enter the second time: 0900 15 hours 30 minutes ______________________________________________________________________________ 8. Write a program that transforms numbers 1, 2, 3, ..., 12 into the corresponding month names January, February, March, ..., December Hint: 1. Make a very long string "January February Mar…" in which you add spaces such that each month name has the same length. 2. Then use substring to extract the month you want. ______________________________________________________________________________