Reading an integer value time (T) and converting it to equivalent minutes (M) and hours (H):
#include <stdio.h>
void convertTime(int T, int *H, int *M) {
*H = T / 60; // dividing by 60 to get hours
*M = T % 60; // getting the remaining minutes
}
int
Show more…