Skip to content

Instantly share code, notes, and snippets.

@AndresRivera111
Created February 6, 2025 18:21
Show Gist options
  • Save AndresRivera111/b3cbb75db9ab4aede74cb54c43b64fb3 to your computer and use it in GitHub Desktop.
Save AndresRivera111/b3cbb75db9ab4aede74cb54c43b64fb3 to your computer and use it in GitHub Desktop.
Funcion saludar() mas funcion suma()
// funciones basicas que no devuelven valor,
// pero ejecuta las instrucciones entre llaves
void saludar(){
print("buenos dias");
}
void suma(){
int n1=2;
int n2=5;
int s = n1 + n2;
print("La suma de $n1 + $n2 es: $s");
}
void main() {
print("Andres Rivera 22308051281295");
// llamar a la funcion saludar
saludar();
// llamar a la funcion suma
suma();
}
@AndresRivera111
Copy link
Author

Funcion suma()

image

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