Question: Write a program that asks the user to enter two doubles and prints the sum, difference, product, and division of these numbers. If the

 Write a program that asks the user to enter two doubles and prints the sum, difference, product, and division 

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: Sum: Difference: Product: Division: ******* 19 The results are: 11 60 3.75 Enter the first number: 10 Enter the second number: 0 Sum: Difference: Product: 0 Division: can not be calculated because of the value 0 of the second number 10 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

It looks like youre asking for a program that allows the user to input two numbers and then calculat... View full answer

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 Programming Questions!