Advertisement
Guest User

Untitled

a guest
Oct 17th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication47
  8. {
  9. class Cal
  10. {
  11. public string day;
  12. public string month;
  13. public string year;
  14. public Cal(string d, string m, string y) { day = d; month = m; year = y; }
  15.  
  16. public void GetInfo()
  17. {
  18. Console.WriteLine("Введенная дата: {0} {1} {2}", day, month, year);
  19. }
  20. }
  21.  
  22. class Program
  23. {
  24. static void Main(string[] args)
  25. {
  26. Console.WriteLine("Введите день");
  27. string d = Console.ReadLine();
  28.  
  29. Console.WriteLine("Введите месяц");
  30. string m = Console.ReadLine();
  31.  
  32. Console.WriteLine("Введите год");
  33. string y = Console.ReadLine();
  34.  
  35. Cal date = new Cal(d, m, y);
  36. date.GetInfo();
  37. Console.ReadKey();
  38. }
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement