Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- montse
- Date:
- 2020-04-11
- Revision:
- 25:32acf45398b4
- Parent:
- 24:7f14b70fc9ef
- Child:
- 26:c1f837b137f8
File content as of revision 25:32acf45398b4:
#include "mbed.h" //libreria que nos permite utilizar comandos y sentencias propias de mbed #include <iostream> //Mediante el uso del condicional if implementar un programa que permita imprimir diferentes mensajes cuando se presionan al menos tres diferentes teclas. Serial com1(USBTX, USBRX); using namespace std; int main() { int tecla; com1.printf("Cuantas veces al dia te lavas las manos? \n\n"); if ((tecla <= 9)&&(tecla >= 3)){ com1.printf("Eso es genial. \n"); com1.printf("Que mas personas sean responsables como tu :) \n\n"); } if (tecla <3){ com1.printf("Eso es triste :( \n"); com1.printf("Hazlo mas seguido y no olvides usar gel antibacterial. \n\n"); } if (tecla >=10){ com1.printf("Vaya! Tu si que te cuidas. \n"); } com1.printf("Recuerda, Si te cuidas tu, nos cuidamos todos"); }