Share your repls and programming experiences

← Back to all posts
4
Messing around with variables

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

Loading Repl
Commentshotnewtop
1

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)

1

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

1

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.

1

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

3

@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/