Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is C++ 1. The West Coast sales division of a company generates 58 percent of total sales. Based on that percentage, write a program

This is C++

1. The West 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 West Coast division will generate based on the total sales entered by a user.

2. Write a program that computes the total bill including tax and tip on a restaurant bill. Prompt the user to enter the meal charge. Compute the tax of 9.75% and a tip of 20 % of the total after tax has been added. Store each result in a separate variable. Output the sales tax, tip, and the total. Format the output as shown below.

3. Find the compile errors in the following program and fix them. Hint: Dont forget the return 0; statement. 2. Properly format the code to be clean and organized according to the instructions above. 3. Run the program with 5 and 0 as input and observe the output. Then add a condition to the program that prevents the runtime error above and prints an error message instead 4. The quotient is always an integer value. Change the code so that the quotient variable will always store the proper floating point value of the division.

4. Write a program that asks the user to enter the month (1-12) and the year(0-2019).Validate the input and print an error and stop the program if an invalid month or year was entered.The program should then display the number of days in that month. Use the following criteria to identify leap years:1.Determine whether the year is divisible by 100. If it is, then it is a leap year if and only if it is divisible by 400. For example, 2000 is a leap year but 2100 is not.2.If the year is not divisible by 100, then it is a leap year if and only if it is divisible by 4. For example, 2008 is a leap year but 2009 is not.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Database Programming With Visual Basic.NET

Authors: Ying Bai

1st Edition

0521712351, 978-0521712354

More Books

Students also viewed these Databases questions