提交时间:2019-10-20 19:16:38

运行 ID: 1779

#include<stdio.h> void trans(int sec){ int hour,min; hour=sec/3600; min=(sec%3600)/60; sec=(sec%3600)%60; printf("%d:%d:%d\n",hour,min,sec); } int main(){ int sec; printf("请输入秒数:\n"); scanf("%d",&sec); trans(sec); return 0; }