Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication1
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("Enter takeoff hour: ");
- int hour = int.Parse(Console.ReadLine());
- Console.Write("Enter takeoff mins: ");
- int min = int.Parse(Console.ReadLine());
- if (hour < 7)
- {
- if (min != 0)
- min = 60 - min;
- if (min == 0)
- hour--;
- hour = 6 - hour;
- //DateTime takeoff = new DateTime(1, 1, 1, hour, min, 1);
- //Console.WriteLine("Can only take off in " + takeoff.ToString("hh:mm"));
- Console.WriteLine("Can only take off in " + hour + " hours and " + min + " minutes.");
- }
- else
- Console.WriteLine("Takeoff is green lighted");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement