Welcome

>>>Welcome to my "CODE BAZAR"
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others
Code marshal
URI online judge
Others

Update ✔✔✔ Upcoming programming book (.pdf) "Programming Contest (data structures and algorithms) by Md. Mahbub Hasan & "Graph Algorithms" by Safayat Asraf "****** Date: 20 March, 2019****Hazrat Ali****

Sunday 30 October 2016

K. Thermometer
Problem link
https://algo.codemarshal.org/contests/diu-122-fl16-termwork/problems/K

Score: 1

CPU: 1s
Memory: 512MB

Temperature given in Fahrenheit (F) can be converted to the corresponding temperature in Celsius (C) using 
the formula C = (F-32) / 9 * 5.
A patient is considered to have fever if his body temperature is more than 98.4 degree Fahrenheit. Now, given a patient's temperature in Celsius, your task is to determine whether (s)he has fever or not.

Input

An integer, denoting the patient's temperature in Celsius.

Output

If the patient has fever print Fever. Print Not fever otherwise.

Samples

InputOutput
25Not fever
InputOutput
40Fever

Solution

#include<stdio.h>
int main()
{
    int n;
    double c;
    scanf("%d",&n);
    c=((98.4-32)*5)/9;
    if(n>c)
    {
        printf("Fever\n");
    }
    else
    {
        printf("Not fever\n");
    }
    return 0;
}

No comments:

Post a Comment