quick question issue with code

int mNumber = 0;
int numChanges=0;
int a;
for( i= 1; 1<= 9; i++)
{
a = i +( i%3);

if ( mNumber <= a)
{
mNumber = a;
numChanges++;
cout << a;
}
}
cout << “mNumber is changed : “<<numChanged<<” times.”<< endl;

for some reason there is a issue with the for loop any help would be great!
I'm not sure what the problem is.

What is this code supposed to do?
for( i= 1; 1<= 9; i++)
The condition is always true (one is always less than nine). Should this be:
for( i= 1; i<= 9; i++)?
Topic archived. No new replies allowed.