搜索
查看: 1219|回复: 3
打印 上一主题 下一主题

哪位帮我写下书上 倒计时2分钟的代码?

[复制链接]
楼主
发表于 2013-10-20 16:08:04 | 显示全部楼层
//超短代码
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main(){
int i=2*60;//两分钟
while(i){
system("cls");
printf("剩余%d秒",i);
i--;
Sleep(1000);
}
return 0;
}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表