C Language program to convert days to hours

Views: 130   

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

#include <stdio.h>

int main(void) {
    int days;

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

    int hours = days * 24;

    printf("%d Hours", hours);
}

Output:

Please enter days: 55
1320 Hours
On By