搜索
查看: 4109|回复: 17
打印 上一主题 下一主题

P167两分钟的倒计时该怎么编啊?

[复制链接]
楼主
发表于 2013-3-3 20:03:46 | 显示全部楼层
#include <stdio.h>
#include <stdlib.h>
#include<windows.h>
int main()
{int a=1,b=00,c;
printf("%d:%.2d\n",a+1,b);
        for(c=59;a>=00;c--)
    {
   if(c==0){a--;c=59;}
    if(a<0)break;
    Sleep(1000);
    system("cls");
       printf("%d:%.2d\n",a,c);
  }
        system("pause");
        return
沙发
发表于 2013-3-3 20:04:20 | 显示全部楼层
#include <stdio.h>
#include <stdlib.h>
#include<windows.h>
int main()
{int a=1,b=00,c;
printf("%d:%.2d\n",a+1,b);
        for(c=59;a>=00;c--)
    {
   if(c==0){a--;c=59;}
    if(a<0)break;
    Sleep(1000);
    system("cls");
       printf("%d:%.2d\n",a,c);
  }
        system("pause");
        return 0;
}

点评

这个是最简洁的,写的好,赞一个。  发表于 2013-3-5 16:29
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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