Advertisement
Guest User

13. 1000 Days After Birth

a guest
Oct 15th, 2017
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace _1000DaysAfterBirth
  9. {
  10.     class Program
  11.     {
  12.         static void Main(string[] args)
  13.         {
  14.             var inputDate = Console.ReadLine();
  15.             var parsedDate = DateTime.ParseExact(inputDate, "dd-MM-yyyy", CultureInfo.InvariantCulture);
  16.             parsedDate = parsedDate.AddDays(999);
  17.             Console.WriteLine(parsedDate.ToString("dd-MM-yyyy"));
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement