i want to write a while loop that will display the column number whenever the number changes
what i wrote is this
int n;
for (Bruce(n + 1) = Bruce(n))
{
n = n + 1;
}
Bruce (n);
\\ here's the place where i'm stuck, I dont' know how to loop it so it will display 3 and 4. right now my code only stop on the first change of number.
for (int i=1; i<12; i++)
{
if (Bruce[i] != Bruce [i-1])
{ cout << "Change at col " << i << endl;
cout << "Old val = " << Bruce[i-1] << endl;
cout << "New val = " << Bruce[i] << endl;}
}