Lesson Details

Break Statement Examples

Academic Year 2018/19

1s Period Robotics Tue/Thur

Date

Dec. 11, 2018

Additional Info
#include <iostream>
using namespace std;
int main(){
int number=5;
do{
cout<<number<<endl;
if(number<=3){
break;
}
number--;
}
while(number>=0);
/* while(number>=0){
cout<<number<<endl;
if(number==3){
break;
}
number=number-1;
}*/
return 0;
}//