Skip to content

Instantly share code, notes, and snippets.

@Asyhbd2
Created February 6, 2025 18:46
Show Gist options
  • Save Asyhbd2/dd068cdc1da51ef1b419fba7dbceba00 to your computer and use it in GitHub Desktop.
Save Asyhbd2/dd068cdc1da51ef1b419fba7dbceba00 to your computer and use it in GitHub Desktop.
Ejemplo de función flecha
//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");
}
@Asyhbd2
Copy link
Author

Asyhbd2 commented Feb 6, 2025

Salida el ejemplo flecha resta
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment