Trạng Thái Nhiệt Độ
View as PDF
Submit solution
Points:
0.10
Time limit:
1.0s
Memory limit:
64M
Input:
stdin
Output:
stdout
Authors:
Problem type
Viết chương trình nhập nhiệt độ (temperature) theo độ C. Hiển thị thông báo phù hợp theo trạng thái nhiệt độ bên dưới.
Temp < 0 in ra "Freezing weather"
0 ≤ Temp < 10 in ra "Very Cold weather"
10 ≤ Temp < 20 in ra "Cold weather"
20 ≤ Temp < 30 in ra "Normal in Temp"
30 ≤ Temp < 40 in ra "Its Hot"
Temp ≥ 40 in ra "Its Very Hot"
Input
input một dòng duy nhất là nhiệt độ (Temp) theo độ C
Output
output một dòng duy nhất là trạng thái nhiệt độ
Examples
Input
42
Output
Its very hot
Input
14
Output
Cold weather
Comments
include <bits/stdc++.h>
using namespace std; long long n; int main() { cin>>n; if(n<0) { cout<<"Freezing weather"; } if(0<=n && n<10) { cout<<"Very Cold weather"; } if(10<=n && n<20) { cout<<"Cold weather"; } if(20<=n && n<30) { cout<<"Normal in Temp"; } if(30<=n && n<40) { cout<<"Its Hot"; } if(n>=40) { cout<<"Its Very Hot"; } return 0; }
:0