Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years 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.