标签:c++
1.判断t是否为真
2.t自减
3.根据1决定是否进入循环
代码:
#include<cstdio> using namespace std; int main() { int t; scanf("%d",&t); while(t--) { printf("%d\n",t); } printf("%d\n",t); return 0; }
测试数据:5
结果:
标签:c++
原文地址:http://blog.csdn.net/xky1306102chenhong/article/details/46273837