Skip to content

Instantly share code, notes, and snippets.

@Diego-Rodriguez5
Created February 6, 2025 18:21
Show Gist options
  • Save Diego-Rodriguez5/f4e45818c79c0c03891ccbb9f8b069cc to your computer and use it in GitHub Desktop.
Save Diego-Rodriguez5/f4e45818c79c0c03891ccbb9f8b069cc to your computer and use it in GitHub Desktop.
Función saludar () mas función suma ()
// funciones basicas que no devuelve valor
//pero ejecuta las instrucciones entre llaves
void saludar(){
print("Buenos Dias");
}
void suma(){
int n1=5;
int n2=10;
int s = n1 + n2;
print("La suma de $n1 + $n2 es: $s");
}
void main() {
print("Diego Jesus Rodriguez Chavez 22308051281296");
// llamar a la funcion saludar()
saludar();
// llama a la funcion suma
suma();
}
@Diego-Rodriguez5
Copy link
Author

image

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