program is supposed to convert a user inputed number of minutes into days, hours, and minutes
#include <stdio.h>
int main(void) {
int input_minutes, minutes, r_minutes;
int days, hours;
float r_days, r_hours;
printf("Enter a number of minutes: ");
scanf("%d", &input_minutes);
days = input_minutes / 1440;
Here is where I want to get the remainder of input_minutes divided by 1440 but instead I am getting 160.00007 when I compile.
r_days = input_minutes % 1440;
hours = r_days * 24;
r_hours = (r_days * 1440) - hours;
minutes = r_hours * 60;
printf("r_days = %f", r_days);
printf("This represents:%d days, %d hours, %d minutes\n",days, hours, minutes);