Created
February 6, 2025 18:46
-
-
Save Renata-Ronquillo-5-J/7387095d0add3e5d71c64a423c84e667 to your computer and use it in GitHub Desktop.
Ejemplo de función de flechas
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 devuelvan valor | |
//y ejecutar las instrucciones entre llaves | |
int resta(int a, int b){ | |
return a-b; | |
} | |
int flecharesta(int a, int b) => a - b; | |
void main(){ | |
print("Renata, 22308051281307"); | |
int x=9; | |
int y = 3; | |
print(" función resta normal "); | |
int r=flecharesta(x,y); | |
print(" La resta de $x - $y es: $r"); | |
print(" Funcion resta ti´po 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 de ejemplo flecha
![image](https://private-user-images.githubusercontent.com/179508442/410596772-3a0ab031-fd14-4fae-8a30-d2436d55eb65.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQyNzAsIm5iZiI6MTczOTMxMzk3MCwicGF0aCI6Ii8xNzk1MDg0NDIvNDEwNTk2NzcyLTNhMGFiMDMxLWZkMTQtNGZhZS04YTMwLWQyNDM2ZDU1ZWI2NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQ2MTBaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1iNWMwZWY2OTQ0N2JjNzMxMWI3ZTAwYWUzMWRiZGRiYTk1MTY4NTMzNjZiMTE4YmUwZThlZTYyNzFmMmI1ODhjJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.LFJmX_2P-r1GUI24ia6iLTZn7NbfETD29YPgsXkvvnU)