Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Security.Cryptography;
- namespace ConsoleApp15
- {
- class Program
- {
- static void Main(string[] args)
- {
- int FlightTime, DepartureTime, Difference, AppropriateDepartureTime, Rescheduled;
- Console.WriteLine("\n==================================");
- Console.WriteLine("\nWelcome to the Plane Departure Time Calculator 2000!");
- Console.Write("\nPlease indicate the Plane's Flight Time (in hours): ");
- FlightTime = int.Parse(Console.ReadLine());
- Console.WriteLine("==================================");
- Console.Write("\nPlease indicate the Plane's Departure Time Between (0 - 24): ");
- DepartureTime = int.Parse(Console.ReadLine());
- Console.WriteLine("==================================");
- if (DepartureTime >= 7)
- {
- Console.WriteLine("Your flight starts at {0} : 00 , enjoy your flight!", DepartureTime);
- }
- else
- {
- if (DepartureTime < 7)
- {
- Difference = (DepartureTime - 7);
- AppropriateDepartureTime = (Difference * -1);
- Rescheduled = (AppropriateDepartureTime + DepartureTime);
- Console.WriteLine("Your flight was rescheduled by {0} Hours. The Aircraft will take off at {1} : 00", AppropriateDepartureTime, Rescheduled);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement