Question

Assignment 1 Date: 02/04/2019 The number of plants purchased at a store is related to the number of available plants and the

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If you have any doubts, please give me comment...

#include<iostream>

#include<fstream>

using namespace std;

int main(){

ifstream in;

in.open("in.txt");

if(in.fail()){

cout<<"Unable to open in.txt"<<endl;

return 0;

}

int amount, temp, perc, initial_amount;

in>>amount;

initial_amount = amount;

while(!in.eof()){

in>>temp;

if(temp<40)

perc = 10;

else if(temp<60)

perc = 30;

else if(temp<70)

perc = 50;

else if(temp<80)

perc = 60;

else

perc = 40;

amount -= amount*(perc/100.0);

}

cout<<"Estimated total sale is "<<(initial_amount - amount)<<" plants"<<endl;

return 0;

}

Add a comment
Know the answer?
Add Answer to:
Assignment 1 Date: 02/04/2019 The number of plants purchased at a store is related to the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 1 (30 marks) The scores of 60 students in a test are: 58 49 48...

    Question 1 (30 marks) The scores of 60 students in a test are: 58 49 48 62 50 76 61 82 60 72 70 35 61 55 82 66 50 47 36 58 84 55 68 32 62 58 48 75 80 49 55 67 71 46 40 57 69 70 52 60 48 53 42 68 54 60 63 70 72 68 42 55 36 70 36 82 66 46 59 50 (i) Find the mean score of the...

  • Due Sun 02/03/2019 10:00 The following data represents the age of 30 lottery winners. 21 30...

    Due Sun 02/03/2019 10:00 The following data represents the age of 30 lottery winners. 21 30 34 35 37 38 38 39 42 42 4549 62 63 63 66 67 68 68 72 76 77 78 84 Complete the frequency distribution for the data. Age Frequency 20-29 30-39 40-49 50-59 60-69 70-79 80-89 Hint: Frequency Tables Textbook Pages Points possible: 1 This is attempt 1 of 3 Message instructor about this question MacBook Air F7 F8 Flo Fn

  • For each variable of interest, do the following: 1. Find the mean, five-number summary, range, variance,...

    For each variable of interest, do the following: 1. Find the mean, five-number summary, range, variance, and standard deviation. Display these numbers in a format that is easy to understand. 2. For each variable of interest, use its five-number summary to construct a boxplot. Each boxplot must be constructed horizontally, and must be accompanied by a brief descriptive paragraph that assesses whether the data appear to be symmetrical, left-skewed, or right-skewed. Construct a 95% confidence interval for the mean μ...

  • Data Table 1: Temperature Changes during Mixing of Different Volumes of 0.10 M HCl and 0.10 M NaOH Experiment Number HC...

    Data Table 1: Temperature Changes during Mixing of Different Volumes of 0.10 M HCl and 0.10 M NaOH Experiment Number HCI (mL) NaOH (mL) Room Temp (°C) Temp of mix (°C) 100 0 22 22 0 90 10 22 23 1 3 80 20 22 24 2 4 5 70 60 30 40 22 22 26.8 28 4.8 6 6 50 50 22 28 6 7 40 50 22 27 5 8 30 70 22 26 4 9 20 80...

  • Consider the below matrixA, which you can copy and paste directly into Matlab.

    Problem #1: Consider the below matrix A, which you can copy and paste directly into Matlab. The matrix contains 3 columns. The first column consists of Test #1 marks, the second column is Test # 2 marks, and the third column is final exam marks for a large linear algebra course. Each row represents a particular student.A = [36 45 75 81 59 73 77 73 73 65 72 78 65 55 83 73 57 78 84 31 60 83...

  • NUMBER OF PEOPLE 10.2 10.0 10.1 8.5 10.2 8.2 8 Source: United States Census. 11. In...

    NUMBER OF PEOPLE 10.2 10.0 10.1 8.5 10.2 8.2 8 Source: United States Census. 11. In the Sanitary District of Chicago, operating engineers are hired on of a competitive civil-service examination. In 1966, there were 223 appl for 15 jobs. The exam was held on March 12; the test scores are s arranged in increasing order. The height of each bar in the histogram next page) shows the number of people with the correspondin examiners were charged with rigging the...

  • Question 1 Question 2 Answer last part Question 3: Do a graph for actors and actresses...

    Question 1 Question 2 Answer last part Question 3: Do a graph for actors and actresses Question Help 4.1.5 Which of the following values cannot be probabilities? 0.03, 1.38, 5/3. 2,0. -0.52,1. 3/5 Select all the values that cannot be probabilities. A. 5 B. 0 C. -0.52 D. 3 5 E. 2 F. 0.03 G. 1 H 1.38 3.3.33 Question Help Use the same s Use the boxplot ling data sets Pulse rates for men and women Click the i...

  • o Write a function that outputs even numbers less than the input number. • Function name...

    o Write a function that outputs even numbers less than the input number. • Function name should be 'evenprint'. • A number is given as input to the function. . The function must return a list of even numbers def evenprint(num): #write statement >[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74,...

  • RANGES FREQUENCY RELATIVE FREQUENCY CUMULATIVE REL. FREQ. 1 - 10 11 - 20 21 - 30 31 - 40...

    RANGES FREQUENCY RELATIVE FREQUENCY CUMULATIVE REL. FREQ. 1 - 10 11 - 20 21 - 30 31 - 40 41 - 50 51 - 60 61 - 70 71 - 80 81 - 90 91 - 100 '= 100 DATA VALUES?? SO, WHAT DOES A FREQUENCY TABLE TELL US? If you wrote each of the above data values on a ping pong ball,, put them in a jar and blindly pulled one out: What is the probability that this ball...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT