Advertisement
AvengersAssemble

Much-Simpler

Sep 9th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.74 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace QuadraticEquationSolver
  7. {
  8.     class Program
  9.     {
  10.         static void Main(string[] args)
  11.         {
  12.             Console.WriteLine("Enter hour of takeoff:");
  13.             int hour = int.Parse(Console.ReadLine());
  14.             Console.WriteLine("Enter minutes of takeoff:");
  15.             int mins = int.Parse(Console.ReadLine());
  16.             Console.WriteLine("Enter flight duration in minutes:");
  17.             int flightDuration = int.Parse(Console.ReadLine());
  18.             mins += flightDuration;
  19.             hour += mins / 60;
  20.             mins %= 60;
  21.             Console.WriteLine("Hours: " + hour + " Minutes: " + mins);
  22.         }
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement