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 ConsoleApp2
- {
- class PDate
- {
- private int day;
- public int Day
- {
- get
- {
- return day;
- }
- set
- {
- if (value < 1 || value > 31)
- Console.WriteLine("ты пидрила ахуел сука");
- else
- day = value;
- }
- }
- private int month;
- public int Month
- {
- get
- {
- return month;
- }
- set
- {
- if (value < 1 || value > 12)
- Console.WriteLine("ты пидрила ахуел сука бич");
- else
- month = value;
- }
- }
- public PDate()
- {
- day = 1;
- month = 12;
- }
- public PDate(int day,int month)
- {
- Day = day;
- Month = month;
- }
- public virtual int Nextday()
- {
- if (Day != 31)
- Day++;
- else
- Console.WriteLine("ты чепушила ебучий глаза разуй ебать ебаный рот");
- return Day;
- }
- public static bool operator >(PDate o1,PDate o2)
- {
- if (o1.month > o2.month)
- return true;
- else if(o1.month==o2.month)
- {
- if (o1.day > o2.day)
- return true;
- else
- return false;
- }
- else
- return false;
- }
- public static bool operator <(PDate o1, PDate o2)
- {
- if (o1.month < o2.month)
- return true;
- else if (o1.month == o2.month)
- {
- if (o1.day < o2.day)
- return true;
- else
- return false;
- }
- else
- return false;
- }
- //public static bool operator <(PDate o1, PDate o2)
- //{
- // if (o1.month < o2.month)
- // return o1.month < o2.month;
- //}
- }
- class PMDate : PDate
- {
- public int Year { get; set; }
- public PMDate(int day,int month,int year)
- : base(day,month)
- {
- Year = year;
- }
- public override int Nextday()
- {
- if (Day < 30)
- Day += 2;
- else
- Console.WriteLine("сука ты еблан чтоли, куда прибавляем? Хуй соси");
- return Day;
- }
- }
- class Program
- {
- static void Main(string[] args)
- {
- PDate date1 = new PDate(23, 11);
- PDate date2 = new PDate(31, 11);
- PDate date3 = new PDate(23, 5);
- bool res = date1 > date2;
- Console.WriteLine(res);
- res = date3 > date1;
- Console.WriteLine(res);
- Console.WriteLine($"так нахуй погнали {date1.Day} уебали +1 = ебать {date1.Nextday()}");
- PMDate date1_1 = new PMDate(5, 11, 2017);
- Console.WriteLine($"так нахуй погнали {date1_1.Day} уебали +2 = ебать {date1_1.Nextday()}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement