Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment 1 Date: 02/04/2019 The number of plants purchased at a store is related to the number of available plants and the temperature outdoors. The
Assignment 1 Date: 02/04/2019 The number of plants purchased at a store is related to the number of available plants and the temperature outdoors. The relationship of outdoor temperature to sales is Outdoor Temperature Colder than 40 degrees, i.e., temp40 Between 40 degrees and 60 degrees, i.e., 40 = 80 Percentage of Plants sold 10% | 30% | 50% | 60% | 40% Write a program in C++ that will read the input from the file (in.txt) for the number of available plants in the store and then the outdoor temperature for the week. Your program will calculate the estimated number of plants which will be sold in a week (7 days) using the user input. Sample Input 100 40 89 62 32 42 53 Sample Output Estimated total sale is 96 plants. Explanation for the above output: On the first day the store had 100 available plants to sale. Temperature on Day 1 is 40 deg Temperature on Day 2 is 89 deg Temperature on Day 3 is 62 deg Temperature on Day 4 is 32 deg > 30% sold-> 70 available plants for the next day > 40% sold-> 42 available plants for the next day. > 50% sold :> 21 available plants for the next day. > 10% sold-> 19 available plants for the next day. Temperature on Day 5 is 42 deg .> 30% sold .> 13 available plants for the next day. Temperature on Day 6 is 53 deg .> 30% sold 9 available plants for the next da
Step by Step Solution
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