static void Main(string[] args) { Cylinder objCylinder = new Cylinder(); objCylinder.Process(); objCylinder.Result(); }
public static void Main() { Cylinder obj = new Cylinder(); obj.Process(); obj.Result(); }
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(); }
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(); }
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(); }
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); } } }