jhonatan angel
/
Nucleo_blink_led
Proyect ON-Off_LED
Diff: main.cpp
- Revision:
- 0:cc8f4469adda
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Aug 28 01:24:58 2018 +0000 @@ -0,0 +1,30 @@ +#include "mbed.h" + + +Serial pc(USBTX,USBRX); + +int main() +{ + float op1=0,op2=0,res; + char ope; + + pc.printf("ingrese primer valor"); + op1 = pc.getc(); + pc.putc(op1); + pc.printf("\n ingrese segundo valor"); + op2 = pc.getc(); + pc.printf("\n ingrese tercer valor"); + ope = pc.getc(); + + switch (ope) + { + case '+': res = op1+op2; + break; + + + + + } + + pc.putc(res); +}