Design a C# solution with a Main ( ) method that holds an integer variable named seconds to which you will assign a value. Create a method to which you pass this value. The method displays the seconds in minutes and seconds. As an example 66 seconds is 1 minute and 6 seconds.
Add a second method to the solution. This method displays a passed argument as hours, minutes and seconds. For example 3666 seconds is 1 hour, 1 minute and 6 seconds.
Add a statement to the Main ( ) method so that after it calls the methods to convert seconds to minutes and seconds, it passes the same value to the new method to convert it to hours, minutes and seconds
2007-02-03
14:06:08
·
4 answers
·
asked by
CR
2
in
Computers & Internet
➔ Programming & Design
Here is what I have so far: What ex
namespace ConsoleApplication1
{
class Program
{
public static void Main()
{
int seconds = 66;
int minutes = seconds / 60;
int seconds = seconds - minutes*60;
Console.WriteLine(seconds,minutes);
}
printHours(int time)
{
Console.WriteLine();
}
2007-02-03
14:06:24 ·
update #1
It's not homework, its an exercise we have to do for our own benefit and to help study for a midterm. :-)
2007-02-03
15:21:29 ·
update #2
C# stands for C sharp
2007-02-03
15:27:52 ·
update #3