Share your repls and programming experiences

← Back to all posts
Messing around with variables
RobertFurr (18)

If any of you have noticed lately, I've been learning C++ lately. Here's a thing I made when I learned about variables.

Commentshotnewtop
SPQR (344)

cool to see more C++ people :)
Helpful Hint: you can do a += 2 instead of a = a + 2. (also works with other things, i.e. a = a - 2 is the same as a -= 2)

SPQR (344)

Also, https://www.learncpp.com/ is a good site for learning C++

MATTHEWBECHTEL (122)

I’m confused XD. If a is 0 and your doing a = a + 2 the it’d be 0 = 0 + 2 which = a + heyyy (3) + 1; so result = 6. Oh ok so you mad a = 2 by using the first equation. It took a second to realize how it works. Cool.

katyadee (1086)

Great work! Thanks for sharing this. How are you finding C++?

RobertFurr (18)

@katyadee It's a bit tricky, but I'm finally getting somewhere in the coding world :D. I did find a website with a great C++ tutorial. Here's the link: http://www.cplusplus.com/doc/tutorial/