Answered step by step
Verified Expert Solution
Question
1 Approved Answer
hello can someone help me with this assignment on the C++ coding? Your goal is to read in and calculate the ratio between two quantities.
hello can someone help me with this assignment on the C++ coding?
Your goal is to read in and calculate the ratio between two quantities. The catch is that your program has 10 handle any category of object. For example the user might want to first track shoes and laces, then the next time they run the program track mountains and climbers, or some objects. Two sample runs are shown below, where the user input is shown in yellow. (You don't have to change the color for your program.) Note the first column adjusts to the length of the words. Your output should be formatted in 2 columns, as shown above. Note that the input words may be arbitrarily long and your formatting for the first column should adjust accordingly. You may assume all numbers are short enough so that a column width of 10 for the second coefficient. The ratios should be reported with exactly 2 decimal places. You may assume all the input numbers are positive whole numbers. The categories should be labelled in the first two output rows. The second two rows should show the ratios between the quantities. The labels foe the ratios should involve singular nouns ('mountain-to climber ratio' not 'mountains-to-climbers ratio'). You may assume that the plural nouns and that the pluralization involves only adding "$" to the end of the singular noun. So we could have input words such as "things" and "dragons", but not "feet" or "glasses". You may assume each object category is a single word, Just before the return 0; statement write the pause command: system("pause"); Upload to CCLE source file hw3.cpp with exactly this name (all lowercase, no spaces). Correctness: No errors, calculations correct Handlesinput/output correctly, formats output, precision as specified, column widths adjust to length of words Correctly manipulates all sump (Removes s etc.) Code is efficient but easy to follow Style: Variable names, comments, Indentation Your goal is to read in and calculate the ratio between two quantities. The catch is that your program has 10 handle any category of object. For example the user might want to first track shoes and laces, then the next time they run the program track mountains and climbers, or some objects. Two sample runs are shown below, where the user input is shown in yellow. (You don't have to change the color for your program.) Note the first column adjusts to the length of the words. Your output should be formatted in 2 columns, as shown above. Note that the input words may be arbitrarily long and your formatting for the first column should adjust accordingly. You may assume all numbers are short enough so that a column width of 10 for the second coefficient. The ratios should be reported with exactly 2 decimal places. You may assume all the input numbers are positive whole numbers. The categories should be labelled in the first two output rows. The second two rows should show the ratios between the quantities. The labels foe the ratios should involve singular nouns ('mountain-to climber ratio' not 'mountains-to-climbers ratio'). You may assume that the plural nouns and that the pluralization involves only adding "$" to the end of the singular noun. So we could have input words such as "things" and "dragons", but not "feet" or "glasses". You may assume each object category is a single word, Just before the return 0; statement write the pause command: system("pause"); Upload to CCLE source file hw3.cpp with exactly this name (all lowercase, no spaces). Correctness: No errors, calculations correct Handlesinput/output correctly, formats output, precision as specified, column widths adjust to length of words Correctly manipulates all sump (Removes s etc.) Code is efficient but easy to follow Style: Variable names, comments, IndentationStep 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