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 precioProducto = 100.99; | |
int cantidadProducto = 15; | |
double descuento = 0.23; | |
double totalCompra = 0.0; | |
double totalSinDescuento = precioProducto*cantidadProducto; | |
double montoDescuento = descuento*totalSinDescuento; | |
totalCompra = totalSinDescuento-montoDescuento; |
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 = 43; | |
double calificacion = 11.5; | |
double temperatura = 27; | |
String nombre = "Luis Oblitas"; | |
double mitadEdad = edad/2; | |
double sumaCalifTemp = calificacion + temperatura; | |
String mensajeEdad = "Mi nombre es $nombre y tiene una edad 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 = [12, 5, 8, 2, 23]; | |
print ('La suma es ${sumarNumeros(listaNumeros)}'); | |
} | |
String sumarNumeros(List<int> listaNumeros){ | |
int contador = 0; |
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 = [4,32,120,145,36,23,78,20]; | |
print('El numero mayor es ${numeroMayor(listaNumeros)}'); | |
} | |
int numeroMayor(List<int> listaNumeros){ | |
int mayor = 0; | |
int contador = 0; | |
while(contador < listaNumeros.length){ | |
if(contador == 0){ |
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<Estudiante> listaEstudiante = [ | |
Estudiante ('Luis', 43, 13), | |
Estudiante ('Miguel', 35, 18), | |
Estudiante ('Maria', 37, 20), | |
Estudiante ('Alberto', 41, 14), | |
Estudiante ('Andrea', 33, 16), | |
Estudiante ('Luciana', 42, 12), | |
Estudiante ('Miriam', 44, 20), |
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<Vehiculo> listaVehiculo = [ | |
Vehiculo ('Ford', 'Ford Bronco 4x4', 1913), | |
Vehiculo ('Nissan', 'NV350 Urvan', 1918), | |
Vehiculo ('Toyota', 'Corolla Cross', 1920), | |
Vehiculo ('Chevrolet', 'Joy Sedán Black', 1914), | |
Vehiculo ('Kia', 'PICANTO JA (FL)', 1916), | |
Vehiculo ('Datsun', 'Datsun GO', 1912), | |
Vehiculo ('Mitsubishi', 'Eclipse Cross 4x4', 1911), |
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<Jugador> listaJugador = [ | |
Jugador ('Juan', 1913), | |
Jugador ('Mijael', 1918), | |
Jugador ('Boris', 1920), | |
Jugador ('Carmelo', 1914), | |
Jugador ('Koko', 1916), | |
Jugador ('Damian', 1912), | |
Jugador ('Mitsubishi', 1911), |
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
class Usuario { | |
String nombre; | |
int edad; | |
Usuario(this.nombre, this.edad); | |
} | |
class Libro { | |
String titulo; | |
String autor; |
OlderNewer