解题思路:
简单的转换嘛,用一下结构体。
参考代码:
#include<bits/stdc++.h> #define hh ios::sync_with_stdio(false),cin.tie(0),cout.tie(0); using namespace std; int n; struct tt { int h=0,m=0,s=0; } tt; int main() { hh; cin>>n; tt.h=n/3600%60; tt.m=n/60%60; tt.s=n%60; printf("%d:%d:%d",tt.h,tt.m,tt.s); return 0; }
水就完事了
0.0分
0 人评分
陶陶摘苹果 (C语言代码)浏览:1607 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:684 |
简单的a+b (C语言代码)浏览:530 |
C语言程序设计教程(第三版)课后习题7.4 (C语言代码)浏览:1246 |
WU-输入输出格式练习 (C++代码)浏览:1082 |
三角形 (C++代码)递推浏览:760 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:506 |
C语言程序设计教程(第三版)课后习题6.5 (C语言代码)浏览:595 |
哥德巴赫曾猜测 (C语言代码)浏览:2350 |
三角形 (C语言代码)浏览:914 |