Looping difference

What is the difference between these two

#include
using namespace std;

int main(){
int i = 1;
while(i<=10){
if(i==5){
break;
}

    cout<<i;
    
    
	i=i+1;
    
	
}
return 0;

}

and

#include
using namespace std;

int main(){
int i = 1;
while(i<=10){

    cout<<i;

    if(i==5){
        break;
    }
    
    
	i=i+1;
    
	
}
return 0;

}

hi @discobot u r breaking before printing 5 in first loop , but in second u r printing the value 5 before breaking out the loop. updated

BTW PLEASE TELL YOUR EMAIL ID AS YOUR DOUBT WAS NOT ASSIGNED TO ANY TA WE NEED TO CHECK

Hi! To find out what I can do, say @discobot display help.