Practica_6_-_Ejercicio_02

Dependencies:   mbed TextLCD

Committer:
rgsbuap
Date:
Tue Oct 08 18:38:01 2019 +0000
Revision:
27:eb32f100130f
Parent:
26:29f649949409
Child:
28:868b283c5f77
Proyecto de funciones

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dan 0:7dec7e9ac085 1 #include "mbed.h"
rgsbuap 26:29f649949409 2 Serial pc(USBTX,USBRX);
rgsbuap 26:29f649949409 3
rgsbuap 27:eb32f100130f 4 //Funcion sin argumento y con retorno
rgsbuap 26:29f649949409 5
rgsbuap 27:eb32f100130f 6 int funcion3(void);
rgsbuap 27:eb32f100130f 7
dan 0:7dec7e9ac085 8
rgsbuap 26:29f649949409 9 int main()
rgsbuap 26:29f649949409 10 {
rgsbuap 27:eb32f100130f 11 int variable;
rgsbuap 27:eb32f100130f 12 variable = funcion3();
rgsbuap 27:eb32f100130f 13 pc.printf("La variable retornada es %d \r\n", variable);
rgsbuap 27:eb32f100130f 14
rgsbuap 26:29f649949409 15 }
rgsbuap 26:29f649949409 16
dan 0:7dec7e9ac085 17
rgsbuap 27:eb32f100130f 18 int funcion3(void)
rgsbuap 27:eb32f100130f 19 { int variable_de_funcion3 = 10;
rgsbuap 27:eb32f100130f 20 return variable_de_funcion3;
rgsbuap 26:29f649949409 21 }