龙言笑


私信TA

用户名:uq_64469050816

访问量:2315

签 名:

要用魔法打败魔法

等  级
排  名 1489
经  验 2737
参赛次数 0
文章发表 30
年  龄 21
在职情况 学生
学  校 郑州工商学院
专  业 软件工程

  自我简介:

解题思路:1小时等于3600秒,1分钟等于60秒,h(小时)=t/3600,m(分钟)=t%3600/60;s(秒)=t%60;

注意事项:

参考代码:

#include<stdio.h>
int main()
{
    int t;
    int h,m,s;
    scanf("%d",&t);
    h=t/3600;
    m=t%3600/60;
    s=t%60;
    printf("%d:%d:%d",h,m,s);
    return 0;
}

 

0.0分

10 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答

代码解释器

  评论区