Advertisement
iliya87

Days to Apply at Software University

Mar 15th, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. class Program
  5. {
  6.     static void Main(string[] args)
  7.  
  8.     {
  9.             DateTime oldDate = new DateTime(2015,04,28);
  10.             DateTime newDate = DateTime.Now;
  11.             TimeSpan ts = oldDate - newDate  ;
  12.                 int differenceInDays = ts.Days;
  13.         string name = (Console.ReadLine());
  14.         Console.WriteLine("{0}, you have only {1} days to apply for the spring semester at Software University!"
  15.             ,name,Convert.ToString(differenceInDays,2));
  16.         }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement