Advertisement
Kuncavia

1000DaysAfterBirth

Sep 6th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.42 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4. class Program
  5. {
  6.     static void Main(string[] args)
  7.     {
  8.         string birthDate = Console.ReadLine();
  9.         string format = "dd-MM-yyyy";
  10.         CultureInfo provider = CultureInfo.InvariantCulture;
  11.         DateTime date = DateTime.ParseExact(birthDate, format, provider);
  12.         date = date.AddDays(999);
  13.         Console.WriteLine("{0}", date.ToString(format));
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement