0

How do I split multiple inputs to separate lines?

I have a code in c language that prompts two inputs but I can't run it, kindly respond.

22nd Apr 2021, 11:50 AM
Richard Mwangi Kamanga.
Richard Mwangi Kamanga. - avatar
5 Antworten
+ 3
Hi Rimwaka, About ways to give inputs for codes, please refer to this code https://code.sololearn.com/WhiNb9BkJUVC/?ref=app P.S. Please tag SoloLearn as this related to a part of the platform (Code Playground input dialog). https://code.sololearn.com/W3uiji9X28C1/?ref=app
22nd Apr 2021, 12:24 PM
Ipang
+ 1
Post the code
22nd Apr 2021, 12:11 PM
Justus
Justus - avatar
+ 1
Thanks
22nd Apr 2021, 12:26 PM
Richard Mwangi Kamanga.
Richard Mwangi Kamanga. - avatar
0
#include <stdio.h> int main() { int s, d; printf("Enter s value: "); scanf("%d", &s); printf("Enter d value: "); scanf("%d", &d); printf("Value of Systolic is = %d in mm Hg.\n" ,s); printf("Value of Diastolic is = %d in mm Hg.\n",d); if(s<120 & d<80){ printf("Normal"); } if(s>=120 && s<=129 & d<80){ printf("Elevated(formerly prehypertension)\n"); } if(s>=130 && s<=139 & d>=80 && d<=89){ printf("High Blood Pressure (Hypertension) Stage 1\n"); } if(s>=140 && s<=180 & d>=90 && d<=120){ printf("High Blood Pressure(Hypertension) Stage 2"); } if(s>180 && d>120){ printf("Hypertensive Crisis\n"); } return 0; }
22nd Apr 2021, 12:20 PM
Richard Mwangi Kamanga.
Richard Mwangi Kamanga. - avatar
0
https://code.sololearn.com/ca61IfH2UZY5/?ref=app the and operator causes the error
22nd Apr 2021, 12:30 PM
Justus
Justus - avatar