Professional Documents
Culture Documents
Code Assignment
Code Assignment
ASSIGNMENT
Reg# 2022-PhD-EE-02
C++ Code:
#include <iostream>
#include <string>
int main() {
if (temp >= 99 && headache == 1 && cough == 1&& BP >= 150 && heartbeat >= 80)
{
cout << "medicine Name 1 ";
}
else if(temp >= 100 && headache == 0 && cough == 1&& BP >= 160 && heartbeat >=
90)
{
cout << "medicine Name 2 ";
{
else if(temp >= 101 && headache == 1 && cough == 0&& BP >= 140 && heartbeat >=
100)
{
cout << "medicine Name 3 ";
{
else if(temp >= 96 && headache == 0 && cough == 1 && BP >= 170 && heartbeat >= 90)
{
cout << "medicine Name 4 ";
{
else if(temp >= 90 && headache == 1 && cough == 0 && BP >= 120 && heartbeat >= 60)
{
cout << "medicine Name 5 ";
}
else {
cout<< "No medicine can be prescribed";
}
return 0;