Created
February 6, 2025 18:21
-
-
Save Gabriel-Montes/e9e7d6918aeb070dfb40a1049eca6533 to your computer and use it in GitHub Desktop.
Función saludar() mas función suma() en Dart
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
//funciones basicas que no devuelvan valor | |
void saludar() { | |
print('Buenos Dias'); | |
} | |
void suma() { | |
int n1 = 2; | |
var n2 = 4; | |
int s = n1 + n2; | |
print('La suma de $n1 + $n2 es $s'); | |
} | |
void main() { | |
print('Gabriel Montes 22308051281276'); | |
//llamar a la funcion saludar() | |
saludar(); | |
//llamar a la funcion suma | |
suma(); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
función suma
![image](https://private-user-images.githubusercontent.com/179508868/410588865-cc017767-0348-4125-9a7f-31896def124a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzMTQyMzIsIm5iZiI6MTczOTMxMzkzMiwicGF0aCI6Ii8xNzk1MDg4NjgvNDEwNTg4ODY1LWNjMDE3NzY3LTAzNDgtNDEyNS05YTdmLTMxODk2ZGVmMTI0YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQyMjQ1MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05MDJlYWI3OThkNDM0MTI5MGI2ZTVhNTM1MDA5ZDZiMTRkNDQ4ZTBkZTBkZGVjMDI5YmM1ZGJkYjZlMDQwNzljJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.aFxa-wD384NgMjX8DfGkxXg6IExB_0xALlgklLxsivA)