Created
February 6, 2025 18:33
-
-
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
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
//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"); | |
} |
tu puedes nancy, confiamos en ti
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Salida
![image](https://private-user-images.githubusercontent.com/179509056/410593212-e645ccc9-9634-4d2e-ba81-38bb539c7ad2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQxMjIsIm5iZiI6MTczOTMxMzgyMiwicGF0aCI6Ii8xNzk1MDkwNTYvNDEwNTkzMjEyLWU2NDVjY2M5LTk2MzQtNGQyZS1iYTgxLTM4YmI1MzljN2FkMi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQzNDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1jMjczYzFmZTZiOGQ3ZGM0ZjU0NjQ5MjY2NjRiNTU4MTEyOGFlNWNmNTJlZTEwNmYwNGJjYmZiYmQ4NGNkMDRiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.VJ2wvaQ4xcljdw5HJHhaJ04FfpYuWKk_wHn4_nU364s)