C# program to convert hours to minutes

Views: 152   

Following program shows you how to convert hours to minutes.
In this program we get hours from user once we get those we need to multiply with 60 so that we get in minutes

using System;

class MainClass {
  public static void Main (string[] args) {
    Console.WriteLine ("Please enter hours:");
    int hours = Convert.ToInt32(Console.ReadLine());
    int minutes = hours * 60;
    Console.WriteLine(minutes + " Minutes");


Please enter hours:
300 Minutes
On By