Created
May 24, 2016 08:02
-
-
Save jmramirezpro/6743d8c771fe0f613ee42977b50fad74 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
/* | |
* FuncionDobleNumero.c | |
* Ejercicios del Podcast Codigo Fuente - Programa 33 | |
* Realizar una función que imprima por pantalla el doble | |
* del número que recibe como parámetro. | |
* Creado el 24 de may. de 2016 | |
* Author: jmramirez | |
*/ | |
#include <stdio.h> | |
#include <math.h> | |
/* Declaración de la función que duplica un número */ | |
void dobleNumero (int numero_formal){ /* Parámetro formal */ | |
int aux; | |
aux = numero_formal * 2; | |
printf ("El doble de %d es %d.\n", numero_formal, aux); | |
} | |
int main(void) | |
{ | |
int numero_real; /* Parámetro real */ | |
printf ("Introduce un número: "); | |
scanf ("%d", &numero_real); | |
/* Llamada a la función */ | |
dobleNumero (numero_real); | |
return (0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment