For Loops

So i am trying to get a variable starting at 0, to increase by 30 until 360. But im having some real trouble. What am i doing wrong? this is my first time working with loops. Any help would be appreciated.

for (degree; degree <= 360; degree + 30) {
cout << degree << endl;
}

This just gives me an endless loop of 0's.
You are adding 30 to degree in the increment step, but you aren't assigning it to anywhere.

1
2
3
for (degree; degree <= 360; degree += 30) { //use += instead
cout << degree << endl;
}
Thank You!!! I knew it was something simple that i missed!
Topic archived. No new replies allowed.