Problem 1

The variable fuelAmount and fuelCapacity hold the actual amount of fuel, and the size of the fuel tank of a vehicle. If less than 10 percent is remaining in the tank, a status light should show a red color; otherwise it shows a green color. Simulate this process with the values of the fuelAmount and fuelCapacity read from the user, and the program printing "red" or green for the particular values.

Problem 2

The college bookstore has Kilobyte Day sale every October 24, giving an 8 percent discount of all computer accessory purchase if the price is less than $128, and a 16 percent discount if the price is at least $128. Write a program that asks the cashier for the original price, and then prints the discounted price.

Problem 3

Write a program that would help me calculate your letter grades according to the college policies: if the score is less than 60, grade is D, C is awarded for score between 70 and 79, B for 80 to 89, and A for 90 to 100.

Problem 4

You have $10,000 in your bank account which earns 5 percent interest per year. How many years does it take for the account balance to be doubled?

Problem 5

Using a for loop, calculate and display the multiplication table of numbers from 1 to 10.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.