Created
February 6, 2025 18:45
-
-
Save sauljimenez24/973dc28a7e32a6be52e37b90c43c1435 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 devuelva el valor | |
// y ejecuta las instrucciones entre llaves | |
int resta(int a, int b) { | |
return a - b; | |
} | |
// Funcion Resta | |
int flecharesta (int a, int b) => a - b; | |
void main() { | |
print(" saul Jimenez 22308051281222"); | |
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/179508454/410596410-f04023a7-d788-4161-80c9-2d70bf7da4d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQyNTgsIm5iZiI6MTczOTMxMzk1OCwicGF0aCI6Ii8xNzk1MDg0NTQvNDEwNTk2NDEwLWYwNDAyM2E3LWQ3ODgtNDE2MS04MGM5LTJkNzBiZjdkYTRkNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQ1NThaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0yZWVjZGQwZjdjZTI4OGQwMzQ3MzY2NWU3NjgxMzRiZmJhNmYyYmU0OTExZDA5MzI2NWQ5NWZmNWM3NGY3NjUwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.MX8uWE8mc9ERoSegga1O1aMcxpUJ00_Kh9ifrJNBfUs)