Advertisement
Guest User

Untitled

a guest
Oct 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 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.             string format = "dd-MM-yyyy";
  15.             string input = Console.ReadLine();
  16.             DateTime inputDate = DateTime.ParseExact(input,format,CultureInfo.InvariantCulture);
  17.            DateTime result= inputDate.AddDays(999);
  18.             Console.WriteLine(result.ToString(format));
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement