搜索
查看: 5747|回复: 22
打印 上一主题 下一主题

【第四章第5节】动手试一试 题解

[复制链接]
楼主
发表于 2015-9-18 13:45:51 | 显示全部楼层
我的思路;
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
int main()
{
        int a=2,b=0;
    while (b>=0)
    {       
        if (10>b)
                printf("%d:0%d",a,b);
        else
        printf("%d:%d",a,b);
        b--;
        if (b<0)
                        {
                                if(a!=0)
                                a--;
                                b=59;
            }
        Sleep(1000);
        system("cls");
    }
        system("pause");
        return 0;
}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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