Created
February 6, 2025 18:33
-
-
Save SamuelGrijalva/2f2983b7e98edcf498db755662641b66 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 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"); | |
} |
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/179714391/410592754-dc61571e-6b80-45ff-9375-de2efed577c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQyNjEsIm5iZiI6MTczOTMxMzk2MSwicGF0aCI6Ii8xNzk3MTQzOTEvNDEwNTkyNzU0LWRjNjE1NzFlLTZiODAtNDVmZi05Mzc1LWRlMmVmZWQ1NzdjMS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQ2MDFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMTFkM2M1NmNmMDI4NDUyYzEwNjQ4ZDY1ZjVlZDE5OGQ2MDAzNTMxNzdjYjAyYWQwNjRlZjk0Yjk5NDdlMDMzJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.sZpYMn8SJg9uHyBcIw2-6dDxQr0aGsiXWswBJaugwuM)