Created
February 5, 2016 07:46
-
-
Save jmramirezpro/f1abc166113174bf137f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Termostato.c | |
* Solución a los ejercicios del podcast Codigo Fuente - Programa 20 | |
* Programa que define y usa un termostato virtual | |
* Creado el 02 de feb. de 2016 | |
* Author: jmramirez | |
*/ | |
#include <stdio.h> | |
/* Definición de tipo de datos propio */ | |
typedef float Temperatura; | |
struct Termostato { | |
Temperatura temp_min; | |
Temperatura temp_max; | |
}; | |
typedef struct Termostato TermostatoACME; | |
int main(void) | |
{ | |
TermostatoACME termo; | |
termo.temp_min = 3.5; | |
termo.temp_max = 20.0; | |
printf("La temperatura puede oscilar entre %4.2f y %4.2f \n", termo.temp_min, termo.temp_max); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment