Created
February 22, 2023 14:12
-
-
Save DemianRamirezR/17783b18ae088603e9403a5ca3f1d2af to your computer and use it in GitHub Desktop.
Trabajos con funciones normales y de tipo flecha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
} |
Author
DemianRamirezR
commented
Feb 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment