C Language program to convert days to seconds


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

#include <stdio.h>

int main(void) {
	int days;

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

	int seconds = days * 24 * 60 * 60;

	printf("%d Seconds", seconds);
}

Output:

Please enter days: 5
432000 Seconds