using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MiCuentaProg { class Cuenta { public string Titular { get; set; } public double Cantidad { get; set; } public Cuenta(string titular, double cantidad) { this.Titular = titular; this.Cantidad = cantidad; } public Cuenta(string titular) { this.Titular = titular; } public void ingresar(double q) { if (q > 0) { this.Cantidad += q; } Console.WriteLine("La cantidad de {0} ahora es {1}", this.Titular, this.Cantidad); } public void retirar(double q) { if (q > this.Cantidad) { this.Cantidad = 0; } else { this.Cantidad -= q; } Console.WriteLine("La cantidad de {0} ahora es {1}", this.Titular, this.Cantidad); } } class Program { static void Main(string[] args) { Cuenta c1 = new Cuenta("Mariano"); Cuenta c2 = new Cuenta("Ernesto", 100.50); c1.Cantidad = 5000.01; c1.ingresar(6000.01); c2.retirar(6000.01); Console.ReadLine(); } } }