English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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

3 answers

what did you expect as output and what you got?

printTime() is useless, there's no return nor out declared.

2007-02-04 20:30:29 · answer #1 · answered by Andy T 7 · 0 0

you're missing a line

{
you = have a huge head;

2007-02-05 03:27:27 · answer #2 · answered by Anonymous · 0 0

wtf is tht all about

2007-02-05 03:27:21 · answer #3 · answered by hellwot 2 · 0 0

fedest.com, questions and answers