#include <stdio.h>

void swap(int *hour,int *min,int *sec,int *time){
    int temp;
    *hour = *time / 3600;
    *time %= 3600;
    *min = *time / 60;
    *sec = *time % 60;
}

int main() {
    
    int time = 3665;
    int hour = 0;
    int min = 0;
    int sec = 0;

    swap(&hour,&min,&sec,&time);
    
    printf("%d 시간 %d 분 %d 초",hour,min,sec);
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: