Converting Minutes to Years and Days
#include <stdio.h>
int main() {
// Define constants for conversion
const int minutesInHour = 60;
const int hoursInDay = 24;
const int daysInYear = 365;
// Input: Number of minutes to be converted
int totalMinutes;
printf("Enter the total minutes: ");
scanf("%d", &totalMinutes);
// Calculate years and remaining days
int totalHours = totalMinutes / minutesInHour;
int totalDays = totalHours / hoursInDay;
int years = totalDays / daysInYear;
int remainingDays = totalDays % daysInYear;
// Display the result
printf("%d minutes is approximately equal to %d years and %d days.\n", totalMinutes, years, remainingDays);
return 0;
}