0% found this document useful (0 votes)
4 views1 page

Temperature Classification Program

The document contains code to take a temperature input from the user and output a description of the weather based on the temperature range, such as freezing, very cold, cold, normal, hot, or very hot.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Temperature Classification Program

The document contains code to take a temperature input from the user and output a description of the weather based on the temperature range, such as freezing, very cold, cold, normal, hot, or very hot.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

#include <iostream>

using namespace std;

int main() {

int temp;

cout << "Enter the temperature please \n";

cin >> temp;

if(temp<0){

cout <<"Freezing weather.\n";}

else

if(temp >=0 && temp<10) {

cout<<"Very Cold Weather";

if(temp >=10 && temp<20) {

cout<<" Cold Weather .\n";

if(temp >=20 && temp<30) {

cout<<"Normal in Temp \n";

if(temp >=30 && temp<40) {

cout<<"Its Hot \n";

if(temp >=40 ) {

cout<<"Its Very Hot \n ";

return 0;

You might also like