First ever for loop

I've never used a for loop before but im trying to use a for loop now instead of a while loop to print the numbers from n1 to n2 but when i set n1 to 5 and n2 to 10 it outputs 11 not al the numbers in between....

cout<<" Enter a number to start the count at. \n";
cin>>n1;
cout<<"Now enter a number to stop the count at. \n";
cin>>n2;

Let's rephrase that to a question: according to you, how is the compiler supposed to know that cout<<i<<" "; is supposed to be part of the for loop instead of a statement that is executed after the for loop?