#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main() {
char patientName;
int age;
double tempCelsius, tempFahrenheit;
// Header Display
cout << "===========================================" << endl;
cout << " ADULT FEVER TEMPERATURE CHECKER " << endl;
cout << "===========================================" << endl;
// User Inputs: Personal Information
cout << "Enter Patient Name: ";
cin >> patientName;
cout << "Enter Patient Age: ";
cin >> age;
// Direct Celsius Input
cout << "Enter Thermometer Temperature (in °C): ";
cin >> tempCelsius;
// Automatic Conversion to Fahrenheit: F = (C * 9/5) + 32
tempFahrenheit = (tempCelsius * 9.0 / 5.0) + 32.0;
// Display Summary Header
cout << "\n===========================================" << endl;
cout << " DIAGNOSIS RESULT " << endl;
cout << "===========================================" << endl;
cout << "Patient Name : " << patientName << endl;
cout << "Patient Age : " << age << endl;
// Formatting to 1 decimal place with C / F display
cout << fixed << setprecision(1);
cout << "Recorded Temp: " << tempCelsius << " °C / " << tempFahrenheit << " °F" << endl;
cout << "-------------------------------------------" << endl;
// Main IF / ELSE IF / ELSE Evaluation (Based on Celsius input)
if (tempCelsius < 37.3) {
cout << "Fever Level : Normal Temperature" << endl;
cout << "Range : Below 37.3 °C / Below 99.1 °F" << endl;
cout << "Advice : Body temperature is within normal limits." << endl;
}
else if (tempCelsius <= 38.0) {
cout << "Fever Level : Low-grade fever" << endl;
cout << "Range : 37.3 °C - 38.0 °C / 99.1 °F - 100.4 °F" << endl;
cout << "Advice : Rest well, stay hydrated, and monitor your symptoms." << endl;
}
else if (tempCelsius <= 39.0) {
cout << "Fever Level : Moderate-grade fever" << endl;
cout << "Range : 38.1 °C - 39.0 °C / 100.6 °F - 102.2 °F" << endl;
cout << "Advice : Take fever reducer medication if needed and get plenty of rest." << endl;
}
else if (tempCelsius <= 41.0) {
cout << "Fever Level : High-grade fever" << endl;
cout << "Range : 39.1 °C - 41.0 °C / 102.4 °F - 105.8 °F" << endl;
cout << "Advice : Consult a healthcare professional if fever persists." << endl;
}
else {
cout << "Fever Level : Hyperthermia" << endl;
cout << "Range : Above 41.0 °C / Above 105.8 °F" << endl;
cout << "Advice : SEEK EMERGENCY MEDICAL ATTENTION IMMEDIATELY!" << endl;
}
cout << "===========================================" << endl;
return 0;
}