Question: write a c++ program that: 1. (20 marks) Write a program that asks the user to enter two doubles and prints the sum, difference, product,

write a c++ program that:

write a c++ program that: 1. (20 marks) Write a program thatasks the user to enter two doubles and prints the sum, difference,

1. (20 marks) Write a program that asks the user to enter two doubles and prints the sum, difference, product, and division of these numbers. If the second number that is entered by the user is zero, the program should print out a message that the Division can not be calculated. However, it prints the results for the other operations. Here are two examples of the execution of the program: ***************************************** Enter the first number: 15 Enter the second number: 4 ***************************************** The results are: 19 11 Sum: Difference: Product: Division: 60 3.75 ****************************************** ***************************************** Enter the first number: 10 Enter the second number: 0 ***************************************** The results are: 10 Sum: 10 Difference: Product: Division: can not be calculated because of the value 0 of the second number 4. (25 marks) You are asked to write a C++ program, which first calculates and prints out the sum of the digits of a number with at most 7 digits. Then it prints out all the divisors of the sum number that is calculated in the previous step. The output should look like this: Enter a number with at most 7-digits: 1259955 Sum of the digits of 1259955 is: 36 The divisors of 36 are as follows: 1 2 3 4 6 9 12 18 36

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!