Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Samantha and Vikas are looking to buy a house in a new development. After looking at various models, the three models they like are
Samantha and Vikas are looking to buy a house in a new development. After looking at various models, the three models they like are colonial, split-entry, and single-story. The builder gave them the base price and the finished area in square feet of the three models. They want to know the model(s) with the least price per square foot. [The entire description of this exercise is on p. 262 of your textbook.] Instructions Write a program that accepts as input the base price and the finished area in square feet of the three models. The program outputs the model(s) with the least price per square foot in the following format: 1. If the colonial model is the least price, output: The price per square foot of the colonial model is the least. 2. If the split-entry model is the least price, output: The price per square foot of the split- entry model is the least. 3. If the single-story model is the least price, output: The price per square foot of the single-story model is the least. 4. If the colonial and split-entry models tie for the least price, output: The price per square foot of the colonial and split-entry models tie for the least. 5. If the colonial and single-story models tie for the least price, output: The price per square foot of the colonial and single-story models tie for the least. 6. If the single-story and split-entry models tie for the least price, output: The price per square foot of the single-story and split-entry models tie for the least. 7. Finally, if all three tie for the least price, output: The price per square foot all three models are the same.
Step by Step Solution
★★★★★
3.53 Rating (150 Votes )
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started