Good beginner practice?

JumBie

Golden Member
May 2, 2011
1,645
1
71
Hey everyone, so I have basically just started to teach my self C++ I'm using the book C++ for dummies 7 in 1, i know it may be a dumb book, but it was the only book i could find. So far I've read quite a bit.

I've learned about different variables (char, string, int, double), I've learned about functions, and operations, and loops(for, while, do while). Before i move onto the next chapter i really feel like i should put some of this to good use and practice. I almost feel as if everything has gone over my head if you know what i mean, its quite a lot to take in. I was wondering if there was any sites where i can practice basic beginner problems relating to what I have learned so far. I don't think this book carries any sort of practice problems or do it your self, not so far at least. If anyone can recommend me some sites i would greatly appreciate it.

Any other advice is welcome, as I'm open to any advice i can get, again thanks in advance.
 

Cogman

Lifer
Sep 19, 2000
10,283
134
106
Working through some simple problems can be pretty helpful. Here are a few you might consider.

* You have a vending machine that has an item priced at $1.14, write a program that will give the correct change for a given user input. IG, they put in 2.15.

* Write a program that will give you that nth Fibonacci number.

* Write a program that will calculate the number of days in a year. Now write a program that will count the number in the years between a range (leap years make this harder than you might think).

* Expand the previous program to print out a calendar (This can be kind of tough).

These are in order of difficulty (assuming you don't cheat and use some library or look up the solutions online). Try it out, come back with any questions you have. Feel free ignore this list and work on something else. The key to understanding programming is to program.
 

JayBlay77

Member
Jul 12, 2004
114
1
0
Working through some simple problems can be pretty helpful. Here are a few you might consider.

* You have a vending machine that has an item priced at $1.14, write a program that will give the correct change for a given user input. IG, they put in 2.15.

* Write a program that will give you that nth Fibonacci number.

* Write a program that will calculate the number of days in a year. Now write a program that will count the number in the years between a range (leap years make this harder than you might think).

* Expand the previous program to print out a calendar (This can be kind of tough).


Thank you! Been looking for stuff like this.
 

Farmer

Diamond Member
Dec 23, 2003
3,334
2
81
Look at stuff like OCW. A good course would be 6.005, though that is in Java. Should transfer to C++ pretty readily.