Guest User

Untitled

a guest
Mar 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. var time = new DateTime(2025, 4, 15, 12, 00, 0);
  2.  
  3. string currentDate = time.ToString("dd/MM/yyyy");
  4. string currentTime = time.ToString("HH:mm");
  5. int timeAdd = 4;
  6.  
  7. Console.WriteLine("Press 'Enter' to advance...");
  8. ConsoleKeyInfo userInput = Console.ReadKey();
  9.  
  10. if (userInput.Key == ConsoleKey.Enter) {
  11. currentTime = time.AddHours(timeAdd).ToString("HH:mm");
  12. timeAdd = timeAdd + 4;
  13. }
Add Comment
Please, Sign In to add comment