Skip to content

Instantly share code, notes, and snippets.

@Nancy-Lara-Baca
Created February 6, 2025 18:33
Show Gist options
  • Save Nancy-Lara-Baca/1755a34f6b15a57622eeb2ef84ba73c3 to your computer and use it in GitHub Desktop.
Save Nancy-Lara-Baca/1755a34f6b15a57622eeb2ef84ba73c3 to your computer and use it in GitHub Desktop.
Función que devuelve un valor return , utiliza parámetros de entrada
//funciones basicas que no devuelve valor,
//pero ejecuta las instrucciones entre llaves
int resta(int a, int b){
return a-b;
}
void main() {
int x = 9;
int y = 3;
int r = resta(x,y);
print("la resta de $x - $y es $r");
}
@Nancy-Lara-Baca
Copy link
Author

Salida
image

@Miguel-Dmz
Copy link

tu puedes nancy, confiamos en ti

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