This file contains hidden or 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 main() { | |
int entero = 1200; | |
double decimal = 12.3; | |
bool estado = true; | |
String cadena = "Es una cadena de texto de prueba"; | |
print ('El número entero es : $entero, el numero decimal es : $decimal, el estado registrado es: $estado, el texto escrito es: $cadena'); | |
This file contains hidden or 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 main() { | |
double numero1 = 100; | |
double numero2 = 25; | |
double suma; | |
double resta; | |
double multiplicacion; | |
double division; | |
suma = numero1 + numero2; |
This file contains hidden or 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 main() { | |
int numero = 25; | |
String mensaje; | |
if (numero > 0){ | |
mensaje = "positivo"; | |
}else{ | |
mensaje = "negativo"; | |
} | |
print('El número ingresado $numero es $mensaje'); |
This file contains hidden or 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 main() { | |
int edad = 9; | |
int mayordeedad = 18; | |
String mensaje; | |
if(edad >= mayordeedad){ | |
mensaje = "Soy mayor de edad"; | |
}else{ | |
mensaje = "Soy menor de edad"; | |
} |
This file contains hidden or 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 main() { | |
final List<int> listaNumeros = [45,32,90,87,34]; | |
print (listaNumeros); | |
listaNumeros.add(123); | |
listaNumeros.add(345); | |
listaNumeros.add(567); | |
print (listaNumeros); |
This file contains hidden or 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 main() { | |
final List<String> NumeroDNI = ['12345678','23432345','12345678','98765430','12345678']; | |
final Set<String> lista_DNI = NumeroDNI.toSet(); | |
final List<String> convertiso_lista = lista_DNI.toList(); | |
print('Listado Inicial: $NumeroDNI'); | |
print('Lista convertido a Set: $lista_DNI'); |
This file contains hidden or 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 main() { | |
Map<String, dynamic> Datos_Generales = { | |
'nombre_estudiante': 'Luis Camarena', | |
'edad_estudiante': 43, | |
'nota_estudiante': 12.87, | |
}; | |
print('Mi nombre es ${Datos_Generales['nombre_estudiante']}, tiene ${Datos_Generales['edad_estudiante']} años, obtuvo una nota de ${Datos_Generales['nota_estudiante']}'); | |
} |
This file contains hidden or 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 main() { | |
Map<String, double> inventario_tienda = { | |
'azucar dulfina 1 kg': 4.00, | |
'arroz coosteño 3/4 4kg': 3.75, | |
'fideos don vitorio 1 kg': 5.10, | |
'cafe instantaneo 100 gr': 2.50, | |
}; | |
final List<String> lista_item = inventario_tienda.keys.toList(); | |
final List<double> precio_item = inventario_tienda.values.toList(); |
This file contains hidden or 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 main() { | |
String mensaje = ""; | |
int numero = 16000; | |
int valorObjetivo = 12000; | |
if(numero > valorObjetivo){ | |
mensaje = "El numero $numero es mayor que valorObjetivo $valorObjetivo."; | |
}else if(numero < valorObjetivo){ |
This file contains hidden or 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 main() { | |
String saludo = "Hola Mundo...!"; | |
print(saludo); | |
} |
OlderNewer