コード例 #1
0
ファイル: Program.cs プロジェクト: burhansavci/HackerRank
            static void Main(String[] args)
            {
                String title     = Console.ReadLine();
                String author    = Console.ReadLine();
                int    price     = Int32.Parse(Console.ReadLine());
                Book   new_novel = new MyBook(title, author, price);

                new_novel.display();
            }
コード例 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the book title: ");
            String title = Console.ReadLine();

            Console.WriteLine("Enter the author's name: ");
            String author = Console.ReadLine();

            Console.WriteLine("Enter the price of the book: ");
            int  price     = Int32.Parse(Console.ReadLine());
            Book new_novel = new MyBook(title, author, price);

            new_novel.display();
        }
コード例 #3
0
        /// <summary>
        /// Main entry method.
        /// </summary>
        /// <param name="args">arguments passed.</param>
        public static void Main(string[] args)
        {
            Console.Write("Enter Book Title: ");
            string title = Console.ReadLine();

            Console.Write("Enter Book Author: ");
            string author = Console.ReadLine();

            Console.Write("Enter Book Price: ");
            int price = int.Parse(Console.ReadLine());

            Book newNovel = new MyBook(title, author, price);

            newNovel.Display();
        }