Beispiel #1
0
        static void Main()
        {
            rectangle r = new rectangle();

            r.setArea(10, 22);
            r.displayArea();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            rectangle d = new rectangle(2, 3);

            d.Findarea();
            d.FindPerimeter();
            Console.WriteLine(d);


            Console.ReadKey();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            rectangle r1 = new rectangle();

            Console.WriteLine("The rectangle has length, width " + r1.getLength() + "," + " " + r1.getWidth() + " "
                              + "and area of " + r1.getArea() + " " + "Perimeter " + r1.Perimeter());

            rectangle r2 = new rectangle(2, 6);

            Console.WriteLine("The rectangle has length, width " + r2.getLength() + "," + " " + r2.getWidth() + " "
                              + "and area of " + r2.getArea() + " " + "Perimeter " + r2.Perimeter());
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            Console.WriteLine("What is width?");
            int w = int.Parse(Console.ReadLine());

            Console.WriteLine("What is heigh?");
            int       h    = int.Parse(Console.ReadLine());
            rectangle good = new rectangle(w, h);

            Console.WriteLine("Area is-" + rectangle.findArea(w, h));
            Console.WriteLine("Perimetre is-" + rectangle.findPerimetre(w, h));
            Console.ReadKey();
        }