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 00:10
How does access indicates that a filter has been applied to a specific column
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
Write a method so that the main() code below can be replaced by the simpler code that calls method original main(): public class calcmiles { public static void main(string [] args) { double milesperhour; double minutestraveled; double hourstraveled; double milestraveled; milesprhour = scnr.nextdouble(); minutestraveled = scnr.nextdouble(); hourstraveled = minutestraveled / 60.0; milestraveled = hourstraveled * milesperhour; system.out.println("miles: " + milestraveled); } }
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
Write a full class definition for a class named player , and containing the following members: a data member name of type string .a data member score of type int .a member function called setname that accepts a parameter and assigns it to name . the function returns no value.a member function called setscore that accepts a parameter and assigns it to score . the function returns no value.a member function called getname that accepts no parameters and returns the value of name .a member function called getscore that accepts no parameters and returns the value of score .this is what i have, aparently this is wrong: class player{private: string name; int score; public: void player: : setname (string n){name =n; }void player: : setscore (int s){score = s; }string player: : getname (){return name; }int player: : getscore (){return score; }};
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
You know the right answer?
You've been hired by Maple Marvels to write a C++ console application that displays information abou...
Questions
question
Biology, 30.11.2020 21:40
Questions on the website: 13722361