Advertisement
grach

2016_January Date After 5 Days

Jan 27th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.54 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 The_day_after_5_days
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int day = int.Parse(Console.ReadLine());
  14.             int month = int.Parse(Console.ReadLine());
  15.  
  16.             DateTime currentDate = new DateTime(2010, month, day);
  17.             currentDate = currentDate.AddDays(5);
  18.  
  19.             Console.WriteLine(currentDate.ToString("d.MM"));
  20.         }
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement