test-3-2-2.cpp
来自「在c环境下的对数据结构进行讲解,包含有例题及答案」· C++ 代码 · 共 25 行
CPP
25 行
//test-3-2-2.cpp
#include <iostream.h>
#include <conio.h>
void main()
{ int a=1,b,count=0;
do { b=1;
do { count++;
b++;
}while(b<=5);
}while (a++<=5);
cout <<"count="<<count;
cout <<"a="<< a;
cout <<"b="<< b;
a=b=count=0;
do { b=10;
do { count--;
b-=2;
}while(b>=0);
}while(--a>=0);
cout <<"\ncount="<<count;
cout <<"a="<< a;
cout <<"b="<< b;
getch();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?