Created
February 6, 2025 18:45
-
-
Save Balderrama-Karla-5J/a4e07e3277a99deb0a8354f0fa3c0b11 to your computer and use it in GitHub Desktop.
Ejemplo 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 devuelve valor | |
//y 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("Karla Alejandra Balderrama Padilla 22308051281149"); | |
//llamar a la funcion saludar() | |
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/179508281/410596556-c1813707-f3a9-4476-a730-9b893ec873d7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQyNTYsIm5iZiI6MTczOTMxMzk1NiwicGF0aCI6Ii8xNzk1MDgyODEvNDEwNTk2NTU2LWMxODEzNzA3LWYzYTktNDQ3Ni1hNzMwLTliODkzZWM4NzNkNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQ1NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iMzAzYjJmYzIyYjZiNmVmODNkNjZhMGRjYjlkY2Q5ZGM5MTQ5MzRiNDJmYWUwOGUyNGZkOTNmMTZlZmRlOGU4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.YezcJmVV69tHwN5tpMMfYdu6EmOeHfueieQAhKYAwXo)