MAIN (intro):
What do the ++ and -– operations do? (and does this give you an idea why C++ has its name?)
Try using ++n instead of n++, and same for the -- operator. What is the difference?
- the ++ operator adds 1 to a number, while the -- subtracts 1 from a number. (C++ is playing on the language C, but "plus one")
- while the numbers print out the same (10, 9, 10), n++ means to "use" n first and then add one to it, while ++n means to add one first before "using" it
Non-numeric variables:
"While" loops:
"For" loops:
Re-writing loop syntax
Debugging: