pachi80

1000 days after birth

Mar 11th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4. namespace _1000_days_after_birth
  5. {
  6.     class Program
  7.     {
  8.         static void Main()
  9.         {
  10.             string dateString = Console.ReadLine();
  11.             string format = "dd-MM-yyyy";
  12.             DateTime result = DateTime.ParseExact(dateString, format, null);
  13.             DateTime ss = result.AddDays(999);
  14.             string dd = ss.ToString("dd-MM-yyyy");
  15.             Console.WriteLine(dd);
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment