Advertisement
striking

1000 days in Earth

Jan 27th, 2016
1,151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. using System;
  2. using System.Globalization;
  3.  
  4. class DaysAfterBirth
  5. {
  6. static void Main()
  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