Skip to content

Instantly share code, notes, and snippets.

@GabrielAlvrado89
Created February 6, 2025 18:46
Show Gist options
  • Save GabrielAlvrado89/10eeedb8d7a0068e2b25c09c982ae0e2 to your computer and use it in GitHub Desktop.
Save GabrielAlvrado89/10eeedb8d7a0068e2b25c09c982ae0e2 to your computer and use it in GitHub Desktop.
Ejemplo de funcion flecha
// Funciones basicas que devuelve valor,
// pero ejecuta las instrucciones entre llaves
int resta(int a, int b){
return a-b;
}
int flecharesta(int a, int b) => a-b;
void main(){
print("Angel Alvarado 22308051281127");
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");
}
@GabrielAlvrado89
Copy link
Author

Salida el ejemplo de flecha
image

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