Skip to content

Instantly share code, notes, and snippets.

@Uribe00
Created February 6, 2025 18:46
Show Gist options
  • Save Uribe00/4502f9f656526912913f62233e930f20 to your computer and use it in GitHub Desktop.
Save Uribe00/4502f9f656526912913f62233e930f20 to your computer and use it in GitHub Desktop.
Ejemplo de funcion flecha
//funciones basicas que no devuelven valor,
//pero ejecuta las instrucciones entre llaves
int resta(int a, int b){
return a-b;
}
// funcion flecha
int flecharesta(int a, int b) => a-b;
void main(){
int x = 9;
int y=3;
print(" funcion resta normal");
int r=resta(x,y);
print ("Daniel Uribe Martinez 2308051281323");
print ("La resta de $x y $y es igual a $r");
print(" funcion resta tipo flecha");
int r1= flecharesta(12,2);
print ("La resta de flecharesta(12,2) es igual a $r1");
}
@Uribe00
Copy link
Author

Uribe00 commented Feb 6, 2025

Salida el ejemplo flecha resta
image

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