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 ConsoleApp1
- {
- enum mname{
- Январь = 1, Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь
- };
- struct TDate
- {
- public int Year;
- public byte Month;
- public byte Day;
- public byte Hour;
- public byte Minute;
- public mname MonthName;
- }
- class Program
- {
- static TDate TDateInput()
- {
- TDate temp;
- Console.Write("Введите номер года:");
- temp.Year = int.Parse(Console.ReadLine());
- temp.Month = 0;
- temp.Day = 34;
- temp.Hour = 25;
- temp.Minute = 60;
- while (temp.Month < 1 || temp.Month > 12)
- {
- Console.Write("Введите номер месяца:");
- temp.Month = Byte.Parse(Console.ReadLine());
- }
- while (temp.Day > 31)
- {
- Console.Write("Введите день:");
- temp.Day = Byte.Parse(Console.ReadLine());
- }
- while (temp.Hour > 24)
- {
- Console.Write("Введите час");
- temp.Hour = Byte.Parse(Console.ReadLine());
- }
- while (temp.Minute > 59)
- {
- Console.Write("Введите минуту:");
- temp.Minute = Byte.Parse(Console.ReadLine());
- }
- temp.MonthName = (mname)temp.Month;
- return temp;
- }
- static bool expired(TDate note)
- {
- var note_time = new DateTime(note.Year,note.)
- }
- static void Main(string[] args)
- {
- TDate noviy = TDateInput();
- Console.WriteLine(noviy.MonthName);
- Console.Read();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement