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 ConsoleApplication47
- {
- class Cal
- {
- public string day;
- public string month;
- public string year;
- public Cal(string d, string m, string y) { day = d; month = m; year = y; }
- public void GetInfo()
- {
- Console.WriteLine("Введенная дата: {0} {1} {2}", day, month, year);
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Введите день");
- string d = Console.ReadLine();
- Console.WriteLine("Введите месяц");
- string m = Console.ReadLine();
- Console.WriteLine("Введите год");
- string y = Console.ReadLine();
- Cal date = new Cal(d, m, y);
- date.GetInfo();
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement