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
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MiApp()); | |
| class MiApp extends StatelessWidget { | |
| @override | |
| Widget build(BuildContext context) { | |
| return MaterialApp( | |
| debugShowCheckedModeBanner: false, | |
| home:Scaffold( |
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 Avion{ | |
| //atributos | |
| int? a; | |
| int? v; | |
| String? az; | |
| String? p; | |
| int? pas; | |
| //funciones |
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 FiguraPerimetro{ | |
| //atributos | |
| double? base; | |
| double? altura; | |
| //funciones | |
| void mostrarDatos(){ | |
| print("el valor de la base = $base"); | |
| print("el valor de la altura = $altura"); | |
| }//fin de funcion mostrarDatos | |
| void perimetro(){ |
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 Mamifero{ | |
| //Atributos | |
| String? nombre; | |
| int? nPatas; | |
| double? peso; | |
| //Funciones | |
| void mostrarDatos(){ | |
| print("Nombre = $nombre"); | |
| print("Numero de patas = $nPatas"); | |
| print("Tiene peso de = $peso Kg"); |
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 Figura { | |
| double? pi; | |
| double? radio; | |
| double? radioe; | |
| void datosfigura() { | |
| print("Pi $pi."); | |
| print("Radio $radio."); | |
| } | |
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 datosPersona(){ | |
| Map persona = { | |
| 'nombre': 'Sergio Saenz', | |
| 'edad': 18, | |
| 'soltero': true | |
| }; | |
| print(persona); | |
| }//fin datos personal | |
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 ordenarListaN(){ | |
| List<int> losNumeros = [100, 20, 10,40]; | |
| print(losNumeros); | |
| losNumeros.sort(); | |
| print(losNumeros); | |
| }//fin de ordenar lista | |
| void ordenaNombresLista(){ | |
| List<String> losNombres = ["Eliseo", "Alejandro", "Jesus","Oscar"]; |
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 multiplica(int a, int b){ | |
| print("La multiplicacion es ${a*b} 😲"); | |
| }//fin multiplico | |
| int resta(int m,int n){ | |
| return m-n; | |
| }//fin de resta | |
| double prectangulo(double b, double h){ | |
| return 2*b + 2*h; |
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 escribeNombre(){ | |
| print("Sergio Saenz 🐧"); | |
| }//Funcion nombre | |
| void restaab(int a,int b){ | |
| int r=0; | |
| r=a -b; | |
| print ("La resta $a - $b es $r"); | |
| }//Fin de resta ab |
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(){ | |
| print("Sergio Azael Saenz Quñones"); | |
| print ("**While loop**"); | |
| int i = 15; | |
| while (i >= 5) { | |
| print(i); | |
| --i; | |
| } |
NewerOlder