Question
1, 2 C++ Programming. Please answer ASAP. Thank you very much. Question 1: Write a C++ program that reads two marks (a mark for mathematic
1, 2 C++ Programming. Please answer ASAP. Thank you very much.
Question 1: Write a C++ program that reads two marks (a mark for mathematic course and another mark for physics course) and the weighting of the mark of mathematics compared to that of physics. The program then displays the weighted average with two obligatory decimals. Below is the example of how the program should look like.
Enter average in math 80.25 Enter the average in physics 100 Enter the weight assigned to mathematics 0.4 The weighted average is then 92.10%
2) Write a C++ program that asks for the different prices for a bus ticket (adult, child, senior). Then, the program asks for the number of adults, elders, and children in the group. The program then displays the total ordered without taxes. Then the program displays the amount of the provincial tax (9.975% of the total Canadian price without tax) and federal tax (5% of the Canadian price total without tax) as well as the total sum including taxes. See the following example of output:
Enter the ticket price for adults: 3.75 Enter the ticket price for children: 1.75 Enter the price of the ticket for seniors: 1.25 Enter the number of adults in your group: 2 Enter the number of children in your group: 3 Enter the number of seniors in your group: 2 The total price to be paid excluding tax is 15.25 dollars The provincial tax to pay is 1.52 dollars The federal tax to pay is 0.76 dollars The amount of all tickets is 17.53 dollars
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started