Skip to content

Instantly share code, notes, and snippets.

View DeveloperFlutter2023's full-sized avatar

DeveloperFlutter2023

View GitHub Profile
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active October 24, 2023 15:11
Tarea N° 01 - Ejercicio N° 1
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;
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active October 24, 2023 15:42
Tarea N° 01 - Ejercicio N° 2
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";
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Created October 24, 2023 16:06
Tarea N° 03 - Ejercicio N° 1
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;
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active October 25, 2023 02:38
Tarea N° 03 - Ejercicio N° 2
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){
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active November 7, 2023 04:29
Tarea N° 04 - Ejercicio N° 1
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),
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active November 7, 2023 04:24
Tarea N° 04 - Ejercicio N° 2
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),
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active November 7, 2023 04:22
Tarea N° 04 - Ejercicio N° 3
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),
@DeveloperFlutter2023
DeveloperFlutter2023 / main.dart
Last active November 10, 2023 16:19
SistemaGestionBiblioteca
class Usuario {
String nombre;
int edad;
Usuario(this.nombre, this.edad);
}
class Libro {
String titulo;
String autor;