C Language program to convert hours to minutes

Views: 122   

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

#include <stdio.h>

int main(void) {
    int hours;

    printf("Please enter hours:");
    scanf("%d", &hours);

    int minutes = hours * 60;

    printf("%d Minutes", minutes);
}

Output:

Please enter hours: 12
720 Minutes
On By