tsekotsolov

DayAfter5Days

Mar 8th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.43 KB | None | 0 0
  1. using System;
  2.  
  3.     class DateAfter5Days
  4.     {
  5.         static void Main()
  6.         {
  7.             string day = Console.ReadLine();
  8.             string month = Console.ReadLine();
  9.  
  10.             DateTime today= DateTime.ParseExact(day + "-" + month + "-"
  11.                 + "2001", "d-M-yyyy", null);
  12.  
  13.             DateTime dayAfter5Days = today.AddDays(5);
  14.  
  15.             Console.WriteLine("{0:d.MM}", dayAfter5Days);
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment