Sum of Two Numbers Write a program that stores the integers 50 and 100 in variables, and
Question:
Sum of Two Numbers Write a program that stores the integers 50 and 100 in variables, and stores the sum of these two in a variable named total.
2. Sales Prediction The East Coast sales division of a company generates 58 percent of total sales. Based on that percentage, write a program that will predict how much the East Coast division will generate if the company has $8.6 million in sales this year.
3. Sales Tax Write a program that will compute the total sales tax on a $95 purchase. Assume the state sales tax is 4 percent, and the county sales tax is 2 percent.
4. Restaurant Bill VideoNote Solving the Restaurant Bill Problem Write a program that computes the tax and tip on a restaurant bill for a patron with a $88.67 meal charge. The tax should be 6.75 percent of the meal cost. The tip should be 20 percent of the total after adding the tax. Display the meal cost, tax amount, tip amount, and total bill on the screen.
5. Average of Values To get the average of a series of values, you add the values up then divide the sum by the number of values. Write a program that stores the following values in five differ-ent variables: 28, 32, 37, 24, and 33. The program should first calculate the sum of these five variables and store the result in a separate variable named sum. Then, the program should divide the sum variable by 5 to get the average. Display the average on the screen.
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis