/* File: minutes.c Use a function to convert minutes to hours & minutes. */ #include void convert_hm(int n, int *h_ptr, int *m_ptr) ; int main() { int n, minutes, hours ; printf("Enter number of minutes: ?") ; scanf("%d", &n) ; convert_hm(n, &hours, &minutes) ; printf("That's equivalent to %d hour(s) and %d minute(s).\n", hours, minutes) ; return 0 ; } /* Function: convert_hm Determines # of hours and # of minutes in n minutes. */ void convert_hm(int n, int *h_ptr, int *m_ptr) { int h ; h = n / 60 ; // # of hours *h_ptr = h ; // store it! *m_ptr = n % 60 ; // store directly return ; }