Skip to content

Instantly share code, notes, and snippets.

@GaelRogelioBejaranoD
Created February 6, 2025 18:46
Show Gist options
  • Save GaelRogelioBejaranoD/2e351a6c23d77e778b5a3d57c233f05e to your computer and use it in GitHub Desktop.
Save GaelRogelioBejaranoD/2e351a6c23d77e778b5a3d57c233f05e to your computer and use it in GitHub Desktop.
Ejemplo de funcion flecha
//Funciones basicas que nodevuelven el valor, pero ejecuta las instrucciones entre llaves
//Funcion flecha
int flecharesta(int a,int aa) => a - aa;
int resta(int a,int aa){
return a - aa;
}
void main() {
print("Roger Bejarano 22308051281154");
int x = 9;
int y = 3;
print("Funcion resta normal");
int r = resta(x,y);
print("La resta entre $x y $y es igual a: $r");
print("Funcion resta tipo flecha");
int rr = flecharesta(12,10);
print("La flecharesta(12,10) es igual a: $rr");
}
@GaelRogelioBejaranoD
Copy link
Author

Salida el ejemplo flecha resta
image

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