Exemple #1
0
        static void Main(string[] args)
        {
            Cylinder objCylinder = new Cylinder();

            objCylinder.Process();
            objCylinder.Result();
        }
Exemple #2
0
        public static void Main()
        {
            Cylinder obj = new Cylinder();

            obj.Process();
            obj.Result();
        }
Exemple #3
0
        public static void Main(string[] args)
        {
            double   radius, height;
            Cylinder cl = new Cylinder();

            Console.WriteLine("Enter radius");
            radius = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter height");
            height = Convert.ToDouble(Console.ReadLine());
            cl.Process(radius, height);
            cl.Result();
        }
Exemple #4
0
        public static void Main(string[] args)
        {
            double   radius;
            double   height;
            Cylinder c = new Cylinder();

            Console.WriteLine("Enter Radius: ");
            radius = Convert.ToDouble(Console.ReadLine());
            Console.WriteLine("Enter Height: ");
            height = Convert.ToDouble(Console.ReadLine());
            c.Process(radius, height);
            c.Result();
        }
Exemple #5
0
        static void Main(string[] args)
        {
            double radius;
            double height;

            Console.WriteLine("Enter the dimenstions of the cylinder");
            Console.WriteLine("Radius: ");
            radius = double.Parse(Console.ReadLine());
            Console.WriteLine("Height: ");
            height = double.Parse(Console.ReadLine());

            Cylinder c = new Cylinder(radius, height);

            c.Process();
            c.Result();
        }
Exemple #6
0
        public static void Main(string[] args)
        {
            var cylinder = new Cylinder();

            Console.WriteLine("Nhập kích thước của hình trụ : ");
            while (true)
            {
                try
                {
                    Console.Write("Bán kính: ");
                    cylinder.Radius = Convert.ToDouble(Console.ReadLine());
                    Console.Write("Chiều cao: ");
                    cylinder.Height = Convert.ToDouble(Console.ReadLine());
                    cylinder.Process();
                    Console.WriteLine(cylinder.Result());
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                }
            }
        }