Skip to content

Instantly share code, notes, and snippets.

@DemianRamirezR
Created February 22, 2023 14:12
Show Gist options
  • Save DemianRamirezR/17783b18ae088603e9403a5ca3f1d2af to your computer and use it in GitHub Desktop.
Save DemianRamirezR/17783b18ae088603e9403a5ca3f1d2af to your computer and use it in GitHub Desktop.
Trabajos con funciones normales y de tipo flecha
void sumaAB(int a,int b){
print("Funcion suma");
print("El resultado es ${a+b}");
print("-------------------------------");
print("Funcion flecha");
}
void sumaAB2(int a,int b) => print("El resultado2 es ${a+b}");
void resta(int a, int b){
print("-------------------------------");
print("Funcion resta");
print("El resultado es ${a-b}");
print("-------------------------------");
print("funcion flecha");
}
void resta2(int a, int b) => print("el resultado2 es ${a-b}");
void rectangulo(double b,double a) => print("el area del rectangulo es de ${b*a}");
void main(){
sumaAB(20,93);
sumaAB2(72,39);
resta(267,234);
resta2(28,945);
print("-------------------------------");
print("Area del rectangulo");
rectangulo(37.5,18.2);
}
@DemianRamirezR
Copy link
Author

image

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