Write a program that can be used to calculate the commission earned in a real estate...

60.1K

Verified Solution

Question

Programming

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

Answer & Explanation Solved by verified expert
3.5 Ratings (396 Votes)
1 Cinclude using    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students