using System; namespace PS1_Q2 { // // Problem Set 1, Question 2 // Written by Paul Hudak // Sept 19, 2006 // class PS1_Q2 { // // Problem 19 in the text. // [STAThread] static void Main(string[] args) { // get input from user Console.Write("Please type in the number of seconds: "); int totalSeconds = int.Parse(Console.ReadLine()); // compute results int hours = totalSeconds / 3600; int remainingMinutes = totalSeconds % 3600; int minutes = remainingMinutes / 60; int seconds = remainingMinutes % 60; // display results Console.WriteLine("\n{0} seconds is the same as {1} hours, {2} minutes, and {3} seconds.\n", totalSeconds, hours, minutes, seconds); } } }