Skip to content

Instantly share code, notes, and snippets.

@Diego-Rodriguez5
Created February 6, 2025 18:33
Show Gist options
  • Save Diego-Rodriguez5/a5aba0cd791ed0c390f13c945a6b1f21 to your computer and use it in GitHub Desktop.
Save Diego-Rodriguez5/a5aba0cd791ed0c390f13c945a6b1f21 to your computer and use it in GitHub Desktop.
Función que devuelve un valor return, utiliza parametros de entrada
// funciones basicas que no devuelve valor
// y ejecuta las instrucciones entre llaves
int resta(int a, int b){
return a-b;
}
void main() {
print("Diego Jesus Rodriguez Chavez 22308051281296");
int x = 9;
int y = 3;
int r= resta(x,y);
print("La resta de $x y $y es: $r");
}
@Diego-Rodriguez5
Copy link
Author

Salida

image

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