Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication22
- {
- class Books
- {
- public string author, title, price;
- public Books(string a, string t, string p)
- {
- this.author = a;
- this.title = t;
- this.price = p;
- PrintBook();
- }
- public void PrintBook()
- {
- Console.WriteLine("Автор: {0}\nНазвание: {1}\nЦена: {2}\n", author, title, price);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Books obj = new Books("Пушкин", "Руслан и Людмила","100");
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement