No. You have your cout and cin in the wrong place. You have to read the numbers BEFORE you start your loop.
1 2 3 4 5 6
int A, B;
cout << "Please enter two numbers" << endl;
cin >> A >> B;
for (int i = A; i < B+1; i++)
{ cout << i << endl;
}
p.s. You can't do a cin to endl.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.