nvnnaidenov

ThousandDaysAfterBirth - Chapter 2.0

Feb 9th, 2022
1,112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.37 KB | None | 0 0
  1. //Task 013, Chapter 2.0
  2. using System;
  3. using System.Globalization;
  4.  
  5. public class ThousandDaysAfterBirth
  6. {
  7.     static void Main()
  8.     {
  9.         string date = Console.ReadLine();
  10.         DateTime dt = DateTime.ParseExact(date, "dd-MM-yyyy", CultureInfo.InvariantCulture);
  11.  
  12.         dt = dt.AddDays(1000);
  13.  
  14.         Console.WriteLine(dt.ToString("dd-MM-yyyy"));
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment