HzuYZL


私信TA

用户名:H2030819025

访问量:57455

签 名:

等  级
排  名 30
经  验 14081
参赛次数 16
文章发表 25
年  龄 0
在职情况 学生
学  校 贺州学院
专  业

  自我简介:

 

0.0分

9 人评分

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

编程语言转换

万能编程问答

代码解释器

  评论区

#include <stdio.h>

int main() {
    int h=0,m=0,s=0,t;
    scanf("%d",&t);
    while (t >= 3600){
        h++;
        t-=3600;
    }
    while (t >= 60){
        m++;
        t-=60;
    }
    while (t >= 1){
        s++;
        t-=1;
    }
    printf("%d:%d:%d",h,m,s);
    return 0;
}

暴解一下呗,没问题(o´ω`o)و
2022-09-06 17:39:09
#include<stdio.h>
int main()
{
    int i,h,m,s;
    scanf("%d",&i);
    if(i<0&&i>86399) printf("eorr!");
    h=i/3600;
    m=(i%3600)/60;
    s=((i%3600)%60);
    printf("%d:%d:%d",h,m,s);
}
2021-11-25 21:44:10
#include<stdio.h>
int main()
{
    int t;
    int H=0,M=0,S=0;
    scanf("%d",&t);
    if(t<0 || t>86399){
        return 0;
    }
    S = t%60;
    M = t/60;
    H = M/60;
    M = M-(H*60);
    printf("%d:%d:%d\n",H,M,S);
    return 0;
}
2021-10-19 09:59:22
请问这个为什么编译错误 求解答 谢谢!
#include<stdio.h>
int main(){
	int x,m,h,s;
	scanf("%d",&x);
	if(0<=x<=86399){
	h=x/3600;
	m=(x-h*3600)/60;
	s=x%60;
	printf("%d:%d:%d",h,m,s);
}
	return 0;
	
}
2021-04-21 22:05:22
  • «
  • 1
  • »