Skip to content

Instantly share code, notes, and snippets.

@Renata-Ronquillo-5-J
Created February 6, 2025 18:46
Show Gist options
  • Save Renata-Ronquillo-5-J/7387095d0add3e5d71c64a423c84e667 to your computer and use it in GitHub Desktop.
Save Renata-Ronquillo-5-J/7387095d0add3e5d71c64a423c84e667 to your computer and use it in GitHub Desktop.
Ejemplo de función de flechas
//Funciones basicas que devuelvan valor
//y ejecutar las instrucciones entre llaves
int resta(int a, int b){
return a-b;
}
int flecharesta(int a, int b) => a - b;
void main(){
print("Renata, 22308051281307");
int x=9;
int y = 3;
print(" función resta normal ");
int r=flecharesta(x,y);
print(" La resta de $x - $y es: $r");
print(" Funcion resta ti´po flecha");
int r1= flecharesta(12,2);
print("La resta de flecharesta(12,2) es $r1");
}
@Renata-Ronquillo-5-J
Copy link
Author

Salida de ejemplo flecha
image

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