Please written by computer source 1, 2 C++ Programming. Please answer ASAP. Thank you very much.
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
Please written by computer source
1, 2 C++
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
Solved in 3 steps with 4 images