

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A c++ program for calculating the energy output of a chemical reaction named reaction x during its two stages. The program takes the pressure as input and outputs the catalyst type, pressure, molarity, and energy for each stage. The energy is calculated using the cosine and sine functions.
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Mohammad Al-Sooj // Mohammad Al-Sooj // Compute the chemical reaction called Reaction X #include
Mohammad Al-Sooj void Results1 (double Pressure) { cout << "Stage #1" << endl; cout << "Catalyst Type: Powdered" << endl; cout << "Pressure: " << Pressure << " Millibars" << endl; cout << "Molarity: 1066" << endl << endl; cout << "The energy is " << StageA(Pressure) << " Kantrons" << endl << endl; } void Results2 (double Pressure, double &Molarity) { cout << "Stage #2" << endl; cout << "Catalyst Type: Liquid" << endl; cout << "Pressure: " << Pressure << " Millibars" << endl; cout << "Molarity: " << Molarity << endl << endl; cout << "The energy is " << StageB(Pressure, Molarity) << " Kantrons" << endl << endl; } double StageA (double Pressure) { double Energy; const double Molarity = 1066; const double Luminosity = 7.0/6.0; Energy = Luminosity * ( cos(Pressure + Molarity) / (sin(Pressure) + sin(Molarity)) ); return Energy; } double StageB (double Pressure, double Molarity) { double Energy; const double Luminosity = 11.0/6.0; Energy = Luminosity * ( cos(Pressure + Molarity) / (sin(Pressure) + sin(Molarity)) ); return Energy; }