static void Main(string[] args) { Console.BackgroundColor = ConsoleColor.Cyan; Console.ForegroundColor = ConsoleColor.Magenta; Mas a = Mas.createFount(30); Mas b = Mas.createGramm(20000); Mas c = a.Add(b); Mas d = b.Sub(a); Console.WriteLine(a.ToString()); Console.WriteLine(b.ToString()); Console.WriteLine(c.ToString()); Console.WriteLine(d.ToString()); Console.WriteLine(a.Founts); Console.WriteLine(d.Gramm); Console.ReadKey(); }
public Mas Sub(Mas a) { return(new Mas(this.Fount - a.Fount)); }
public Mas Add(Mas a) { return(new Mas(this.Fount + a.Fount)); }