Beispiel #1
0
        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();
        }
Beispiel #2
0
 public Mas Sub(Mas a)
 {
     return(new Mas(this.Fount - a.Fount));
 }
Beispiel #3
0
 public Mas Add(Mas a)
 {
     return(new Mas(this.Fount + a.Fount));
 }