跳到正文

个人记录

计时器发布!!!

StemCell_Tony约 1 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 1 分钟

版本

  1. v2当前
  2. v1

使用规则:打开计数器输入你想计的秒数

C++
#include <cstdio>
#include <ctime>
#include <cstdlib>

int main()
{
	int time_ = 0;
	int time_be = 0;
	int time_rv = 0;

	scanf("%d", &time_);

	time_be = time_ + time(NULL);
	time_rv = time(NULL);
	system("cls");

	while (time(NULL) != time_be) {
		if (time(NULL) >= time_rv) {
			++time_rv;
			--time_;
			system("cls");
			printf("%d", time_);
		}
	}

	system("cls");
	printf("\a");
	printf("over!!!");

	return 0;
}
原文