Question

c++ language: In chemistry, the boiling point of a substance is the temperature at which a...

c++ language:

In chemistry, the boiling point of a substance is the temperature at which a liquid form of that substance is converted into a gas. Write a program to determine, and output to the screen, “yes” if a temperature t of a pot of acetone is at or above the boiling point of acetone, namely the temperature 56.2°C, and “no” otherwise. Your submission should include screenshots of the execution of the program using the values t = 45.2, 56.3 and 104.2, all of which are input from the keyboard.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Hello, here is the completed code you wanted. Every important statement is explained using comments. Please check and let me know if you have any doubts. Thanks.

CODE

#include<iostream>
using namespace std;

//main function
int main()
{
   //variables
   float t, boiling_point = 56.2;
  
   //prompt for temperature
   cout<<"Enter temperature of acetone: ";
  
   //reading temperature
   cin>>t;
  
   //if temperature is greater than or equal to boiling point
   if(t >= boiling_point)
       //prints yes
       cout<<"yes";
  
   //if temperature is less than boiling point
   else
       //prints no
       cout<<"no";
  
   return 0;
}

OUTPUT

CODE SCREEN SHOT

Add a comment
Know the answer?
Add Answer to:
c++ language: In chemistry, the boiling point of a substance is the temperature at which a...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT