for (int i = 0; i < 10; i++){
//Do something as long as i is less than 10,
//In that case it will loop 10 times
//use break; to restart the loop whenever you want to cancel the loops.
cout << i;
//at the end, remember i will be increased by 1.
}
//output 0123456789