1. Engineering
  2. Computer Science
  3. has to be done using c please ...

Question: has to be done using c please ...

Question details

**** has to be done using C++ please ****
**** C++ ****

Exercise 5 Cash Register: Ask the user to enter the total amount (in CAD) of the purchased items. 2. Ask the user to enter the total amount (in CAD) paid by the customer 3. Now, the program should display the exact number of bills to be returned to the customer. Example: Enter the total amount of the bill: 326 Enter the amount paid by the customer: 405 You should return to the customer the following: 100S bills: 0 20S bills: 3 10$ bills: 1 5S bills: 1 1S coins: 4Exercise 3 Factorial: Read an integer N from the user then display the factorial of this number, N!. Note that, the factorial of a negative number is undefined. In case the user enters a negative number, the program should notify the user and then ask him to enter a positive number instead. Recall that. N, = N * (N-1)* (N-2)* * 2 * 1 Example: Please enter a positive number: 6 The factorial of 6 is: 6!-720 Exercise 4 Product of first N odd numbers: Read an integer N from the user then display the product of all odd numbers smaller than or equal to N (if N is even, it should not be included in the product). Example Please enter a positive number: 7 The product of all odd numbers smaller than or equal to 7 is 1*3*5*7 = 105 Example: Please enter a positive number:6 The product of all odd numbers smaller than or equal to 6 is 113*5 = 15

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution