Created
February 5, 2016 07:49
-
-
Save jmramirezpro/e87119e5d5d939289d2d 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
/* | |
* ConversionesTipos.c | |
* Solución a los ejercicios del podcast Codigo Fuente - Programa 20 | |
* Programa que practica las conversiones de tipos en lenguaje C | |
* Creado el 02 de feb. de 2016 | |
* Author: jmramirez | |
*/ | |
#include <stdio.h> | |
int main(void) | |
{ | |
int longitud = 3; | |
float espacio, expresion; | |
/* Conversiones implicitas */ | |
longitud = espacio; | |
expresion = espacio * longitud; | |
printf("Longitud es %d y su expresión es %f\n", longitud, expresion ); | |
/* Conversiones explicitas */ | |
espacio = (float)longitud; | |
expresion = espacio * (float)longitud; | |
printf("Espacio es %f y su expresión es %f\n", espacio, expresion ); | |
return(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment