Skip to content

Instantly share code, notes, and snippets.

@SamuelGrijalva
Created February 6, 2025 18:45
Show Gist options
  • Save SamuelGrijalva/f715fe87cc012fd8bc33ea50fd889ea6 to your computer and use it in GitHub Desktop.
Save SamuelGrijalva/f715fe87cc012fd8bc33ea50fd889ea6 to your computer and use it in GitHub Desktop.
//funciones basicas que devuelven el valor,
//y ejecuta 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 ("Samuel Grijalva 22308051281205");
int x = 9;
int y = 3;
print("funcion resta normal");
int r = resta(x, y);
print("La resta de $x y $y es: $r");
print("funcion resta tipo flecha");
int r1 = flecharesta(12, 10);
print("La flecharesta(12, 10) es igual a: $r1");
}
@SamuelGrijalva
Copy link
Author

salida del ejemplo flecha resta
image
image

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