the table below shows the normal boiling points of several substances. write a p
ID: 3620446 • Letter: T
Question
the table below shows the normal boiling points of several substances. write a program that prompts the user foe the observed boiling point of a substance in degree C and identifies the substance if the observed boiling point is within 5% of the expected boiling point. if the data input is more than 5% higher or lower than any of the boiling points in the table, the program should output the message substance unknown.Sub normal boiling point in dgree C
water 100
mercury 357
copper 1187
silver 2193
gold 2660 the table below shows the normal boiling points of several substances. write a program that prompts the user foe the observed boiling point of a substance in degree C and identifies the substance if the observed boiling point is within 5% of the expected boiling point. if the data input is more than 5% higher or lower than any of the boiling points in the table, the program should output the message substance unknown.
Sub normal boiling point in dgree C
water 100
mercury 357
copper 1187
silver 2193
gold 2660
Explanation / Answer
please rate - thanks #include <iostream>using namespace std;
int main()
{double point,high, low;
cout<<"Enter boiling point: ";
cin>>point;
if(point>=100-.05*100&&point<=100+.05*100)
cout<<"water ";
else if(point>=357-.05*357&&point<=357+.05*357)
cout<<"mercury ";
else if(point>=1187-.05*1187&&point<=1187+.05*1187)
cout<<"mercury ";
else if(point>=2193-.05*2193&&point<=2193+.05*2193)
cout<<"silver ";
else if(point>= 2660-.05* 2660&&point<= 2660+.05* 2660)
cout<<"gold ";
else
cout<<"substance unknown ";
system("pause");
return 0;
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.