// // Calculate sulfur dioxide emission rate for a coal sample - without // scrubbing and with scrubbing that is 80% effective // #include using namespace std; const double OXIDATION_FACTOR = 2.0; // oxidizing n pounds of sulfur // produces about 2n pounds of sulfur dioxide const double SCRUB_EFFICIENCY = 0.8; // scrubbing combustion gases // reduces sulfur dioxide emissions by 80% int main() { int sampleId; // input - sample identification number double sulfurContent; // input - % of sample that is sulfur double energyContent; // input - number of Btu per pound // Get data on coal sample cout << "Enter sample identification number => "; cin >> sampleId; cout << "What percent of the sample is sulfur? => "; cin >> sulfurContent; cout << "How many Btu's of energy from one pound of the sample? => "; cin >> energyContent; // Calculate emissions rate for burning this sample double poundsDioxide = sulfurContent / 100.0 * OXIDATION_FACTOR; double emissions = poundsDioxide * 1000000.0 / energyContent; // Calculate emissions rate with scrubbing double withScrubbing = emissions - emissions * SCRUB_EFFICIENCY; // Display results cout << "Sulfur dioxide emissions of coal sample " << sampleId << " with sulfur content of " << endl; cout << " " << sulfurContent << " percent and energy content of " << energyContent << " Btu per pound:" << endl; cout << " Before scrubbing: " << emissions << " pounds per million Btu" << endl; cout << " After scrubbing: " << withScrubbing << " pounds per million Btu" << endl; return 0; }