Created
December 23, 2013 05:12
-
-
Save 64lines/8091964 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| /* | |
| * Funcion.cpp | |
| * Programa con llamada a una funcion | |
| * | |
| * Compilado: g++ funcion.cpp -o funcion | |
| */ | |
| using namespace std; | |
| #include <iostream> | |
| // Funcion llamada | |
| int llamada(int x, int y) { | |
| cout << "Estamos en la funcion!"; | |
| return (x + y); | |
| } | |
| int main () { | |
| cout << "Vamos a llamar a la funcion..."; | |
| // Llamamos a la funcion | |
| // Lamamos una funcion y asignamos; | |
| int z = llamada(5, 7); | |
| cout << "Resultado: " << z; | |
| // Llamada desde el output | |
| cout << "Resultado: " << llamada(6, 7); | |
| cout << "Programa terminado \n"; | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment