Practica_6_-_Ejercicio_03

Dependencies:   mbed TextLCD Keypad

main.cpp

Committer:
rgsbuap
Date:
2019-10-04
Revision:
26:29f649949409
Parent:
25:90e7333db6a7
Child:
27:eb32f100130f

File content as of revision 26:29f649949409:

#include "mbed.h"
Serial pc(USBTX,USBRX);


void funcion1(void); //Funcion sin argumento y sin regreso de dato 
void funcion2(char);//Funcion con argumento y sin retorno

 int main()
{
    funcion1();
    while (1){
char variable1;
 variable1 = pc.getc();
 funcion2(variable1);
}
}


void funcion1()
{ pc.printf("FUNCION SIN ARGUMENTO Y SIN RETORNO\r\n");  
wait(1);
}

void funcion2(char hola)
{if(hola=='5')
{
    pc.printf("variable es %c", hola);
    }
else if(hola == '6')
{
    pc.printf("variable es %c", hola);  
    }
else{
pc.printf("FUNCION CON ARGUMENTO Y SIN RETORNO\r\n");  
   }
   wait(1); }