If temperature is input through the keyboard in Fahrenheit degrees, write a program which determine how is the atmosphere according to the following rules:
if temperature is above 40 degrees centigrade------------------Very hot
if temperature is between 35 & 40 degrees centigrade--------Tolerable
if temperature is between 30 & 35 degrees centigrade--------Warm
if temperature is between 30 & 10 degrees centigrade--------Cool
if temperature is between 10 & 04 degrees centigrade--------Cold
if temperature is less than 04 degrees centigrade---------------Coldest
Answers
Answered by
0
Program :
#include<iostream>
using namespace std;
int main()
{
int temp;
cout<<"Enter temperature in Fahrenheit : ";
cin>>temp;
if(temp > 40)
{
cout<<"Very hot";
}
else if(temp <= 40 && temp > 35)
{
cout<<"Tolerable";
}
else if(temp <= 35 && temp > 30)
{
cout<<"Warm";
}
else if(temp <= 30 && temp > 10)
{
cout<<"Cool";
}
else if(temp <= 10 && temp >= 4)
{
cout<<"Cold";
}
else if(temp < 4)
{
cout<<"Coldest";
}
}
Similar questions
Social Sciences,
1 month ago
Science,
3 months ago
Math,
3 months ago
Math,
9 months ago
Biology,
9 months ago