Not sure what I am doing wrong. My homework says Design 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.
Add a second method top the solution. This method displays a passed argument as hours, minutes and 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.
This is what my code looks like
public class Lab4
{
public static void Main()
{
MinutesSeconds()
HoursMinutesSeconds()
Console.WriteLine("Seconds==98");
}
public static void MinutesSeconds()
{
Console.WriteLine("98 Seconds==1 Minute 38 Seconds");
}
publice static void HoursMinutesSeconds()
{
Console.WriteLine("1 Minute 38 Seconds==0 Hours 1 Minute 38 Seconds");
}
}
What am I doing wrong?