Problem
Chef is not feeling well today. He measured his body temperature using a thermometer and it came out to be °F.
A person is said to have fever if his body temperature is strictly greater than °F.
Determine if Chef has fever or not.
Input Format
- The first line contains a single integer — the number of test cases. Then the test cases follow.
- The first and only line of each test case contains one integer - the body temperature of Chef in °F.
Output Format
For each test case, output YES if Chef has fever. Otherwise, output NO.
You may print each character of YES and NO in uppercase or lowercase (for example, yes, yEs, Yes will be considered identical).
Constraints
Sample 1:
3 98 100 96
NO YES NO
Explanation:
Test Case 1: Since is not greater than , Chef does not have fever.
Test Case 2: Since is greater than , Chef has fever.
Test Case 3: Since is not greater than , Chef does not have fever.
#include <iostream>
using namespace std;
int main() {
int t;
cin>>t;
while(t>0){
int x;
cin>>x;
if(x>98){
cout <<"YES" <<endl;
}else{
cout<<"NO"<< endl;
}
t = t-1;
}
return 0;
}

0 Comments