Question
need help and fairly new to C++ and coding all together. I want to be able to understand it. so can someone explain the steps
need help and fairly new to C++ and coding all together. I want to be able to understand it. so can someone explain the steps to the code
steampunk computing project in C++.
Lets assume execution of one instruction on the Analytical Engine burns a fixed amount of coal in the firebox and uses 0.5 pints of water in the boiler. Your program will com- pute the amount of resources necessary to run a program of a given length. Let the user enter the number of instructions to be executed and the grade of coal being used. Higher grade coal is more expensive per ton, but it burns hotter and requires a smaller amount to heat the boiler. The program will compute and output the number of gallons of water used and the number of tons of coal required. Also, it will output the cost of the coal. There are three grades of coal available, identified by number. This table gives the information necessary for the computations.
grade | ounces burned per instruction | cost of coal per ton |
1 | 4.5 | $6.25 |
2 | 3.0 | $8.50 |
3 | 2.7 | $9.45 |
Recall that there are 16 ounces in 1 pound and 2000 pounds in 1 ton. Also, recall that there are 8 pints in a gallon. Sample Run The following sample shows how the screen must look when your program runs. You must strictly follow this format, wording, spacing, and alignment, including the number of decimal places on the numbers. The characters in red are typed by the user. The other characters are output by the program. Instructions ------- 25000 Grade of coal ------ 2 Water usage ------------ 1562.5 gallons Coal usage ------------- 2.344 tons Coal cost -------------- $19.92
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