[Solved] SOLVED:solution

30 $

File Name: SOLVED:solution.zip
File Size: 141.3 KB

SKU: [Solved] SOLVED:solution Category: Tag:

Or Upload Your Assignment Here:


Write a program that asks the user to enter two decimal numbers. The program should calculate and display the productand quotient of the two numbers. Use a function Product() to calculate the product. The function should have two arguments, which are the two numbers that the user inputs. The function should return the product of the numbers. Use a function Quotient() that has two arguments, which are the numbers input by the user. The function should return the quotient of the first number divided by the second. If the second number is zero (recall that division by zero is not allowed), display an error message and exit the program. _____________________________________________________________________________ Write a program that asks the user to enter two decimal numbers. The program should display the larger of the two numbers. Use a function Max() to find the larger number. Max() should have two arguments, which are the numbers that the user input. Max() should return the larger of the two numbers. _________________________________________________________________ Write a program that raises an integer to a positive integer power. The program should prompt the user to enter the base and the exponent, and the program should display the corresponding power. Use a function Power() to calculate the power. Pass the base and the exponent to the function. Power() should calculate the power by multiplying base by itself exponent times. The function should return the value of the power. _______________________________________________________________________

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] SOLVED:solution
30 $