Created
February 6, 2025 18:46
-
-
Save Asyhbd2/dd068cdc1da51ef1b419fba7dbceba00 to your computer and use it in GitHub Desktop.
Ejemplo de función flecha
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 valor. | |
//Ejecuta las instrucciones entre llaves | |
int resta(int a,int b){ | |
return a-b; | |
} | |
//Funcion flecha | |
int flecharesta(int a, int b ) => a-b; | |
void main() { | |
print("Angel Tadeo 20308051281165"); | |
int x = 9; | |
int y = 3; | |
print("Funcion resta normal"); | |
int r = resta(x,y); | |
print("La resta de $x - $y es $r"); | |
print("Funcion resta tipo flecha"); | |
int r1 = flecharesta(12,2); | |
print("La resta de flecharesta(12,2) es $r1"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Salida el ejemplo flecha resta
![image](https://private-user-images.githubusercontent.com/179719035/410596434-7124c45b-8d8f-4032-98c8-754010074437.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQxMDcsIm5iZiI6MTczOTMxMzgwNywicGF0aCI6Ii8xNzk3MTkwMzUvNDEwNTk2NDM0LTcxMjRjNDViLThkOGYtNDAzMi05OGM4LTc1NDAxMDA3NDQzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQzMjdaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00N2MzYmE3YTYwNzE0NGU4OTBhYjFiM2I4YjEzNmIxODI5MmI5ZTA3Mjg4NWRhNzA3MTJjNjMyMGFhMTQ4NWQ1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.2XheMPFIXD-_KVQn9lzLGQ68gkDSHLdLNEqcesjm21w)