Write a program that can be used to calculate the commissionearned in a real estate transaction. The chart below describes theformulas used to calculate the commission. Your program will askthe user for the sales price as an double, calculate thecommission, and display the sales price and commission. Remember touse constants rather than “magic numbers”.
Sales Price Commission Less than $100,000 5% of the sales price$100,000 to $300,000 $5,000 + 10% of the amount of the sales priceover $100,000 More than $300,000 $25,000 + 15% of the amount of thesales price over $300,000
2. Write a program that acts as a simple calculator. You will askthe user to enter two integers. Then you will ask for an operatorfrom the list *,/,%,+, and -. If the user does not enter a validoperator, you will report the error and not perform any action. Ifthe user asked to do division and the second number is zero, youwill report the error and not perform any action. Otherwise, youwill display what the equation is and the result