Skip to content

Instantly share code, notes, and snippets.

@JannaRG13
Created February 6, 2025 18:46
Show Gist options
  • Save JannaRG13/8f591609d7a8559be7e774b58976c984 to your computer and use it in GitHub Desktop.
Save JannaRG13/8f591609d7a8559be7e774b58976c984 to your computer and use it in GitHub Desktop.
Ejemplo de función flecha
// FUNCIONES BASICAS QUE NO DEVUELVEN VALOR
//PERO EJECUTA LAS INSTRUCCIONES
int resta (int a, int b){
return a-b;
}
// FUNCION FLECHA
int flecharesta (int a, int b)=> a-b;
void main() {
print("Janna Ramirez Granados 22308051281287");
int x=9;
int y=3;
print("Funcion resta normal");
int r=resta(x,y);
print("La resta de $x - $y es de = $r");
print("Funcion resta tipo flecha");
int r1=flecharesta(12,2);
print("La resta de flecharesta(12,2) es de = $r1");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment