static void Main(string[] args) { int cao = 0, rong = 0, dai = 0; var b = new Hop(cao, rong, dai); var r = b.Nhap(); Console.WriteLine(r.TheTich()); Console.ReadKey(); }
public Hop Nhap() { Console.Write("nhap chieu cao cua hop "); int chieuCao = int.Parse(Console.ReadLine()); Console.Write("nhap chieu rong cua hop "); int chieuRong = int.Parse(Console.ReadLine()); Console.Write("nhap chieu dai cua hop "); int chieuDai = int.Parse(Console.ReadLine()); var hop = new Hop(chieuCao, chieuRong, chieuDai); return(hop); }