Skip to content
Snippets Groups Projects
Select Git revision
  • 473357a25164f56514da648c61de7fbac2e9649a
  • master default protected
2 results

Program.cs

Blame
  • Program.cs 922 B
    using System;
    
    namespace _02_1_OpUeberladungBrueche
    {
        class Program
        {
            static void Main(string[] args)
            {
                Bruch b1 = new Bruch(2, 3);
                Bruch b2 = new Bruch(3, 4);
                Bruch b3 = new Bruch(2);
    
                //int k1 = 3;
                //int k2 = 4;
                //k1 * k2;
    
                // b1.Mult_V1(b2); -- NEIN! b1 wird zerstört
    
                Bruch e1 = b1.Mult_V2(b2);
                Bruch e2 = b1.Mult_V3(b2);
                Bruch e3 = b1.Mult_V4(b2);
    
                Bruch e4 = b1.Mult_V4(3);
                //Bruch e5 = 3.Mult_V4(b1);   // geht nicht, da 3 aus Klasse int und nicht Bruch ist
    
                Bruch e5 = Bruch.Mult_V5(b1, b2);
                Bruch e6 = Bruch.Mult_V5(b1, 2);
                Bruch e7 = Bruch.Mult_V5(2, b2);
                int k3 = (int)b1;
    
                Bruch e8 = b1 * b2;
                Bruch e9 = b1 * 2;
                Bruch e10 = 2 * b2 * 3;
            }
        }
    }