0
点赞
收藏
分享

微信扫一扫

20241022_045024 c语言 时分秒三重循环

# include<stdio.h>
# include<stdlib.h>
# include<time.h>



int main(){
	// 变量定义
	int h;
	int m;
	int s;

	// 小时循环
	for(h=0;h<24;h++){
		// 分钟循环
		for(m=0;m<60;m++){
			// 秒钟循环
			for(s=0;s<60;s++){
				printf("%d:%d:%d\n",h,m,s);
			}
		}
	}
	return 0;
}

举报

相关推荐

0 条评论