//Pg 108 #15 Sound Problem // #include <iostream> using namespace std; int main(
ID: 3615871 • Letter: #
Question
//Pg 108 #15 Sound Problem
//
#include <iostream>
using namespace std;
int main()
{
cout <<" *********************************************************************** ";
cout <<"* SoundProblem *";
cout <<" *********************************************************************** ";
// Declare Varibles
int temp1, temp2;
int velocity=331.3+0.61;
char n;
//start main program
do {
//get the starting tempeture from the user
cout <<"Enter The StartingTempeture:";
cin >>temp1;
//Get the ending temp from thre user
cout <<"Enter The Ending Tempeture:";
cin >>temp2;
while (temp1 > temp2)
//Do something
// set up formatting
cout.setf(ios::fixed, ios::floatfield);
cout.setf(ios::showpoint);
cout.precision(2);
cout<<"At <<deg degrees Celsius the Velocityof sound is <<velocity <<endl;
//Ask the user if they want to do anothercalculation
cout << " Would you like to enter moretempetures?";
cout <<" Enter 'y' for 'Yes' -- 'n' for 'No': ";
cin >> n;
cout <<" ";
} while (n == 'y' || n == 'Y'); // enddo-while loop
}
Explanation / Answer
please rate - thanks you sample output, don't fit the formula //Kevin Grissom //Pg 108 #15 Sound Problem // #include using namespace std; int main() { coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.