Skip to content

Instantly share code, notes, and snippets.

@SamuelGrijalva
Created February 6, 2025 18:33
Show Gist options
  • Save SamuelGrijalva/2f2983b7e98edcf498db755662641b66 to your computer and use it in GitHub Desktop.
Save SamuelGrijalva/2f2983b7e98edcf498db755662641b66 to your computer and use it in GitHub Desktop.
función que devuelve un valor return, utiliza parámetros de entrada
//funciones basicas que devuelven el valor,
//y ejecuta ejecuta las instrucciones entre llaves
int resta(int a, int b){
return a - b;
}
void main() {
print ("Samuel Grijalva 22308051281205");
int x = 9;
int y = 3;
int r = resta(x, y);
print("La resta de $x y $y es: $r");
}
@SamuelGrijalva
Copy link
Author

salida
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment