Why isn't this working properly, anyone? Can anyone help correct it?
using System;
class Time
{
public static void Main()
{
int seconds = 66;
printTime(seconds);
printHours(seconds);
}
static void printTime(int seconds)
{
seconds = 66;
int minutes = seconds / 60;
seconds = seconds - minutes * 60;
}
static void printHours(int x)
{
int hours = x % 3600;
int seconds = x - (hours * 3600);
int minutes = seconds % 60;
seconds -= (60 * minutes);
Console.WriteLine(" {0} minute {1} and {2} second {3}");
}}
2007-02-04
19:19:07
·
3 answers
·
asked by
CR
2
in
Computers & Internet
➔ Programming & Design
Using the C# language
2007-02-04
19:32:40 ·
update #1