C++中while循环语句怎么限制次数?

来源:学生学帮网 编辑:学帮网 时间:2024/07/11 01:18:59

C++中while循环语句怎么限制次数?

while(条件){}即可
比如说我要它只能循环10次,则
int n=0;
while(n