I want to know what's the best way to set values to int or double while looping when you want to change on each loop.So basically I'm having issue when I try to set a value for x in the way I'll show, It will sir the same value for one loop I want to do instead of the others as well.
My issue is I think I have the wrong placement because all I get is:
1
1
1
Instead of:
1
2
3
1 2 3 4 5 6 7 8 9 10 11
int n;
for ( n = 1; n <= 3; n++)
{
If (n = 1)
x = 1;
Else if ( n = 2)
x = 2;
Else
x = 3;
cout << x << end;
}