Example #1
0
        static void Main(string[] args)
        {
            Bolshek_san obj1 = new Bolshek_san(17, 7);
            Bolshek_san obj2 = new Bolshek_san(29, 11);
            Bolshek_san obj3;

            Console.WriteLine("1-shi object mani: ");
            obj1.Shygaru();
            Syzyk();
            Console.WriteLine("2-shi object mani: ");
            obj2.Shygaru();
            Syzyk();

            obj3 = obj1 + obj2;
            Console.Write("obj3 = obj1 + obj2  ");
            obj3.Kosu();

            if (obj1)
            {
                Console.WriteLine("\nobj1 bolimi nolge ten !");
            }
            else
            {
                Console.WriteLine("\nobj1 bolimi nolge ten emes !");
            }

            if (obj2)
            {
                Console.WriteLine($"\nobj2 bolimi nolge ten !");
            }
            else
            {
                Console.WriteLine("\nobj2 bolimi nolge ten emes !");
            }
        }
Example #2
0
        public static Bolshek_san operator +(Bolshek_san ob1, Bolshek_san ob2)
        {
            Bolshek_san natizhe = new Bolshek_san();

            natizhe.bsan = ob1.bsan + ob2.bsan;
            return(natizhe);
        }
Example #3
0
        public void Azaytu(Bolshek_san obj2)
        {
            float foo1 = (float)butin_san / boletin_san;
            float foo2 = (float)obj2.butin_san / obj2.boletin_san;
            float res  = foo1 - foo2;

            Console.WriteLine($"{foo1}-{foo2} = {res}");
        }
Example #4
0
        static void Main(string[] args)
        {
            Bolshek_san obj = new Bolshek_san();

            Console.Write("Butin sandy engiz : ");
            obj.butin_san_clon = int.Parse(Console.ReadLine());
            Console.Write("Boletin sandy engiz : ");
            obj.boletin_san_clon = int.Parse(Console.ReadLine());
            Syzyk();
            obj.Shygaru();
        }
Example #5
0
        static void Main(string[] args)
        {
            Bolshek_san obj1 = new Bolshek_san(11, 3);
            Bolshek_san obj2 = new Bolshek_san(17, 6);

            Console.WriteLine("1-shi object mani: ");
            obj1.Shygaru();
            Syzyk();
            Console.WriteLine("2-shi object mani: ");
            obj2.Shygaru();
            Syzyk();
            obj1.Azaytu(obj2);
        }
Example #6
0
        static void Main(string[] args)
        {
            Bolshek_san obj1 = new Bolshek_san();
            Bolshek_san obj2 = new Bolshek_san(29, 6);
            Bolshek_san obj3 = new Bolshek_san(obj2);


            Syzyk();

            obj1.Kosu();
            Syzyk();
            obj2.Kosu(6);
            Syzyk();
            obj3.Kosu(2, 3);
        }
Example #7
0
 public Bolshek_san(Bolshek_san ob)
 {
     this.butin_san   = ob.butin_san;
     this.boletin_san = ob.boletin_san;
 }