subject

You've been hired by Maple Marvels to write a C++ console application that displays information about the number of leaves that fell in September, October, and November. Prompt for and get from the user three integer leaf counts, one for each month. If any value is less than zero, print an error message and do nothing else. The condition to test for negative values may be done with one compound condition. If all values are at least zero, calculate the total leaf drop, the average leaf drop per month, and the months with the highest and lowest drop counts. The conditions to test for high and low values may each be done with two compound conditions. Use formatted output manipulators (setw, left/right) to print the following rows:. September leaf drop
October leaf drop
November leaf drop
Total leaf drop
Average leaf drop per month
Month with highest leaf drop
Month with lowest leaf drop
And two columns:
A left-justified label.
A right-justified value.
Define constants for the number of months and column widths. Format all real numbers to three decimal places. The output should look like this for invalid and valid input:
Welcome to Maple Marvels

Enter the leaf drop for September: 40
Enter the leaf drop for October: -100
Enter the leaf drop for November: 24
Error: all leaf counts must be at least zero.
End of Maple Marvels
Welcome to Maple Marvels

Enter the leaf drop for September: 155
Enter the leaf drop for October: 290
Enter the leaf drop for November: 64
September leaf drop: 155
October leaf drop: 290
November leaf drop: 64
Total drop: 509
Average drop: 169.667
Highest drop: October
Lowest drop: November
End of Maple Marvels

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
question
Computers and Technology, 22.06.2019 08:30
On the loan worksheet in cell c9 enter pmt function to calculate the monthly payment for the altamonte springs 2018 facilities loan. ensure that the function returns a positive value and set the reference to cells b5 and b6 as absolute references.
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
What is the foundation for proper monitoring, load balancing and routing in distributed systems
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
What type of slide show is a dynamic and eye-catching way to familiarize potential customers with what your company has to offer? a. ole b. photo album c. brochure d. office clipboard
Answers: 2
You know the right answer?
You've been hired by Maple Marvels to write a C++ console application that displays information abou...
Questions
question
Computers and Technology, 01.10.2019 14:10
question
Biology, 01.10.2019 14:10
question
Computers and Technology, 01.10.2019 14:10
Questions on the website: 13722361