MiroslavKisov

1000_Days_After_Birth

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