While loop broken?

So when i activate the loop it sprays out a non ending list of 1's
it should print n1 to n2 but its not... .


#include <iostream>
using namespace std;

int main(int argc, const char * argv[])
{

int n1;
int n2;

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;

while (n1 <= n2) {
cout<<n1;
n1=n1=1;


}
n1=n1+1;
Or better:
n1++;
Oh... how embarassing....
Topic archived. No new replies allowed.