ntodorova

27.12-01.NextDate

Dec 31st, 2012
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2.  
  3. class NextDate
  4. {
  5.     static void Main()
  6.     {
  7.         byte day = byte.Parse(Console.ReadLine());
  8.         byte month = byte.Parse(Console.ReadLine());
  9.         ushort year = ushort.Parse(Console.ReadLine());
  10.  
  11.         DateTime enteredDate = new DateTime(year, month, day);
  12.  
  13.         DateTime newDate = enteredDate.AddDays(1);
  14.         Console.WriteLine("{0}.{1}.{2}", newDate.Day, newDate.Month, newDate.Year);
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment