Radostta

1000DaysAfterBirthNull

Aug 9th, 2017
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 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.  
  7. namespace _1000DaysAfterBirth_Book
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. string birthDate = Console.ReadLine();
  14. string format = "dd-MM-yyyy";
  15. DateTime birthDay = DateTime.ParseExact(birthDate, format, null);
  16.  
  17. DateTime after = birthDay.AddDays(999);
  18.  
  19. Console.WriteLine(after.ToString("dd-MM-yyyy"));
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment