10 years, 1 month ago.

how do we write in code to get integer input from keyboard by teraterm emulator?

include "mbed.h" Serial pc(USBTX, USBRX); tx, rx int a; int main() { pc.printf("patient monitoring system\n\r"); while(1){ pc.printf("enter value of a\n\r"); pc.scanf("%d",&a); if(a < 10) { pc.printf("Patient health is good\n\r"); } if(a>10) { pc.printf("Patient needs some monitoring\n\r"); } } }

by using above code a get character value then result display only Patient health is good

please give me correct solution of it.

Question relating to:

Be the first to answer this question.