Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class. Hint: Suppose there are 8 males …

Write a program that asks the user for the number of males and the number of females registered in a class. The program should display the percentage of males and females in the class. Read more »

Ingredient Adjuster A cookie recipe calls for the following ingredients: 1.5 cups of sugar 1 cup of butter 2.75 cups of flour The recipe produces 48 cookies with this amount of the ingredients. Write a program that asks the user …

A cookie recipe calls for the following ingredients: 1.5 cups of sugar 1 cup of butter 2.75 cups of flour The recipe produces 48 cookies with this amount of the ingredients. Write a program that asks the user how many cookies he or she wants to make, and then displays the number of cups of each ingredient needed for the specified number of cookies Read more »

Celsius to Fahrenheit Temperature Converter Write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows: F = (9/5) C + 32 The program should ask the user to enter a temperature in Celsius, and then …

Write a program that converts Celsius temperatures to Fahrenheit temperatures. The formula is as follows: F = (9/5) C + 32 Read more »

Miles-per-Gallon A car’s miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Write a program that asks the user for the number of miles driven and the gallons of gas used. …

A car’s miles-per-gallon (MPG) can be calculated with the following formula: MPG = Miles driven / Gallons of gas used Write a program that asks the user for the number of miles driven and the gallons of gas used Read more »

Sales Tax Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales …

Write a program that will ask the user to enter the amount of a purchase. The program should then compute the state and county sales tax. Assume the state sales tax is 4 percent and the county sales tax is 2 percent. Read more »