Answer to Question #301132 in C# for Kun

Question #301132

Create a new project, and name it P1T4

Write a program that requests a number of minutes from the user and then converts and displays the minutes as hours and minutes

Hint – make use of the / and % operators

Your running program could resemble the following:


1
Expert's answer
2022-02-22T06:44:04-0500
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace P1T4
{
    class Program
    {
        static void Main(string[] args)
        {
             
            Console.WriteLine("Enter a number of minutes: ");
            int minutes = Convert.ToInt32(Console.ReadLine());

            int hours = minutes / 60;
            minutes = minutes - hours * 60;
            Console.WriteLine(" {0:00} : {1:00}", hours, minutes);
            
            Console.ReadKey();

        }
    }

   
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS