static void Main(string[] args)
        {
            Argentina elmasgrande = new Argentina();
            string    estado;

            if (elmasgrande.PrecioGlobal() < 500)
            {
                estado = "baja";
            }
            else
            {
                if (elmasgrande.PrecioGlobal() < 1000)
                {
                    estado = "super";
                }
                else
                {
                    estado = "hyper";
                }
            }
            Console.Write("Estado de inflacion: " + estado);

            if (estado == "hyper" && elmasgrande.UnProductor())
            {
                Console.WriteLine("\nLa Argentina esta en default");
            }
        }
        static void Main(string[] args)
        {
            int       total = 0;
            Argentina ar    = new Argentina();

            ar.BajarPrecioPetroleo();
            ar.MillaiEnTV();
            ar.CoronaVairas();

            foreach (var alfajor in ar.GetLista)
            {
                total += alfajor.Precio;
                //Console.WriteLine("total:"+total);
            }

            if (total < 500)
            {
                Console.WriteLine("El estado de la inflacion es normal");
            }
            else
            if (total > 500 && total < 1000)
            {
                Console.WriteLine("El pais tiene super inflacion");
            }
            else
            if (total > 1000)
            {
                Console.WriteLine("El pais tiene hyper inflacion");
                Console.WriteLine("El pais esta en default");
            }
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            Argentina argentina = new Argentina();

            int opcion = 0;
            int suma;

            while (opcion != 5)
            {
                Console.WriteLine(
                    "1)Bajar el precio del pretroleo\n" +
                    "2)Millai habla por TV\n" +
                    "3)CoronaVaira\n" +
                    "4)Saber Inflacion\n" +
                    "5)Salir");
                opcion = Int32.Parse(Console.ReadLine());

                switch (opcion)
                {
                case 1:
                    argentina.BajarElPrecioDelPetroleo();
                    break;

                case 2:
                    argentina.MillaiHablaPorTV();
                    break;

                case 3:
                    argentina.CoronaVairas();
                    break;

                case 4:
                    suma = argentina.inflacion();
                    if (suma < 500)
                    {
                        Console.WriteLine("Estado:Inflacion normal");
                    }
                    else
                    {
                        if (suma > 500 && suma < 1000)
                        {
                            Console.WriteLine("Estado:Super Inflacion");
                        }
                        else
                        {
                            Console.WriteLine("Estado: Hyper Inflacion\nLa Argentina esta en default");
                        }
                    }
                    break;
                }
            }
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            int       op      = 1;
            Argentina alfagor = new Argentina();

            while (op != 0)
            {
                Console.WriteLine("En que estado se encuentra el pais?");
                Console.WriteLine("1: Bajar el precio del petróleo");
                Console.WriteLine("2: Milllai habla por tv");
                Console.WriteLine("3: CoronaVairas");
                Console.WriteLine("4: Estado de inflacion");
                Console.WriteLine("5: Argentina esta default? ");

                op = Int32.Parse(Console.ReadLine());

                switch (op)
                {
                case 1:
                    foreach (Alfajor aux in alfagor.petroleo())
                    {
                        Console.WriteLine("Alfajor: " + aux.Nombre + " " + aux.Precio);
                    }
                    break;

                case 2:
                    foreach (Alfajor aux in alfagor.millaiTv())
                    {
                        Console.WriteLine("Alfajor: " + aux.Nombre + " " + aux.Precio);
                    }
                    break;

                case 3:
                    foreach (Alfajor aux in alfagor.coronaVairas())
                    {
                        Console.WriteLine("Alfajor: " + aux.Nombre + " " + aux.Precio);
                    }
                    break;

                case 4:
                    Console.WriteLine(alfagor.situacionPais());
                    break;

                case 5:
                    Console.WriteLine("Default? " + alfagor.argDefault());
                    break;
                }
            }
        }
Exemplo n.º 5
0
        static void Main(string[] args)
        {
            Argentina Pais = new Argentina();

            Console.WriteLine("El estado de la inflacion: " + Pais.EstadoDeInflacion());

            if (Pais.EstadoDefault())
            {
                Console.WriteLine("Hay estado de default");
            }
            else
            {
                Console.WriteLine("No hay estado de default");
            }
        }
        static void Main(string[] args)
        {
            Argentina argentina = new Argentina();

            argentina.Mostrar();
            argentina.BajarElPrecioDelPetroleo();
            Console.WriteLine("El nivel de inflacion es " + argentina.Inflación());
            argentina.Mostrar();
            string texto = argentina.Defoult() ? "Argentina esta en defoult" : "Argentina esta bien";

            Console.WriteLine(texto);
            argentina.MilllaiHablaPorTV();
            argentina.Mostrar();
            argentina.CoronaVairas();
            argentina.Mostrar();
            Console.WriteLine("El nivel de inflacion es " + argentina.Inflación());
            argentina.Mostrar();
        }
Exemplo n.º 7
0
        static void Main(string[] args)
        {
            Argentina argentina = new Argentina();
            string    opcion    = " ";

            do
            {
                Console.WriteLine("Que desea hacer?: \n" +
                                  "[1]Bajar el precio del petroleo\n" +
                                  "[2]Hacer que Millei hable por TV\n" +
                                  "[3]Coronavairas\n" +
                                  "[4]Saber el estado de la inflaccion\n" +
                                  "[5]Saber si Argentina esta en default\n" +
                                  "[0]Salir");
                opcion = Console.ReadLine();
                switch (opcion)
                {
                case "1":
                    argentina.BajarElPrecoiDelPetroleo();
                    break;

                case "2":
                    argentina.MillaiHablaPorTV();
                    break;

                case "3":
                    argentina.CoronaVairas();
                    break;

                case "4":
                    Console.WriteLine("El estado de la inflaccion es: " + argentina.EstadoDeInflaccion());
                    break;

                case "5":
                    Console.WriteLine("La argentina esta en default? " + argentina.ArgentinaEnDefault());
                    break;

                case "0":
                    opcion = "0";
                    break;
                }
            }while(opcion != "0");
        }
        static void Main(string[] args)
        {
            string    evento;
            int       estado  = 0;
            int       opcion1 = 2;
            Argentina argen   = new Argentina();

            elalfajor.Add(new Alfajor("mani", "fulbito", 14));
            elalfajor.Add(new Alfajor("dulce de leche", "wuaymayen", 18));
            elalfajor.Add(new Alfajor("dulce de leche", "capitan del espacio", 32));
            elalfajor.Add(new Alfajor("chocolate", "capitan del espacio", 22));
            do
            {
                Console.WriteLine("¿que evento ocurrio?\nbajar el precio del petroleo\nmillai habla por tv\ncoronavairas");
                evento = Console.ReadLine();
                if ("bajar el precio del petroleo" == evento)
                {
                    argen.petroleo();
                }
                else
                {
                    if ("millai habla por tv" == evento)
                    {
                        argen.millai();
                    }
                    else
                    {
                        if ("coronavairas" == evento)
                        {
                            argen.coronavairas();
                        }
                    }
                }
                Console.Write("el estado de la inflacion es :");
                int i = 0;
                foreach (var item in elalfajor)
                {
                    estado += elalfajor[i].estado();
                    i++;
                }
                if (estado < 500)
                {
                    Console.WriteLine("normal");
                }
                else
                {
                    if (estado > 500 && estado < 1000)
                    {
                        Console.WriteLine("super");
                    }
                    else
                    {
                        if (estado > 1000)
                        {
                            Console.WriteLine("hyper");
                            Console.WriteLine("la argentina esta en default");
                        }
                    }
                }
                Console.WriteLine("a ocurrido otro evento?\n1)si\n2)no");
                estado  = 0;
                opcion1 = Int32.Parse(Console.ReadLine());
            }while(opcion1 == 1);
        }
        static void Main(string[] args)
        {
            Alfajor        Waymayen  = new Alfajor("negro", 15, "Waymayen");
            Alfajor        Jorgelin  = new Alfajor("blanco", 40, "Jorgelin");
            Alfajor        Oreo      = new Alfajor("triple oreo", 50, "Oreo");
            List <Alfajor> alfajores = new List <Alfajor>();

            alfajores.Add(Waymayen);
            alfajores.Add(Jorgelin);
            alfajores.Add(Oreo);
            Argentina argentina = new Argentina(alfajores);

            int opcion = 0;
            int salir  = 1;

            while (salir == 1)
            {
                Console.WriteLine("Lista de precio de alfajores: ");
                foreach (var i in argentina.Alfajores)
                {
                    Console.WriteLine("Alfajor: " + i.NombreDeEmpresa + " Precio: " + i.Precio);
                }
                Console.WriteLine("Ingrese un num para:\n[1]Bajar el precio del petróleo\n[2]Milllai habla por tv\n[3]CoronaVairas\n[4]Ver estado de inflacion" +
                                  "\n[5]Ver si argentina esta en dafault");
                opcion = Int32.Parse(Console.ReadLine());
                switch (opcion)
                {
                case 1:
                    Console.WriteLine("El precio de petroleo bajo por el contexto economico mundial!");
                    argentina.BajarPrecioDePetroleo();
                    break;

                case 2:
                    Console.WriteLine("Millai pronostica una hiper a fin de anio si no achican el estado en tv!");
                    argentina.MilllaiHablaPorTv();
                    break;

                case 3:
                    Console.WriteLine("[URGENTE] Aumenta los contagios en argentina por el coronavairas");
                    argentina.CoronaVairas();
                    break;

                case 4:
                    Console.WriteLine("El estado de inflacion de argentina es :" + argentina.Inflacion());
                    break;

                case 5:
                    if (argentina.Default())
                    {
                        Console.WriteLine("Argentina entro en default");
                    }
                    else
                    {
                        Console.WriteLine("Argentina No entro en default");
                    }
                    break;
                }
                Console.WriteLine("Ingrese 1 para continuar o otro num para salir");
                salir = Int32.Parse(Console.ReadLine());
            }
        }