Problem Solving

Hi All,

I am new to programming.. learning some code in order to hopefully transfer departments.

I am finding that writing the code and getting the programs to run is relatively easy.. I am just struggling with how to solve a problem and then set the code to do what i want it to do ..

Does that make sense.. like I know how to make a loop, but how do you figure out how you should loop before writing it.. ie having i=0 or i=1..
For example.. with doing the factorial problem or doing the Fibonacci problem.

Any suggestions on where to begin on this design or problem solving topic?


What book/tutorial are you using? It usually comes with trial and error, and a lot of practice. You could solve the factorial problem recursively, or with a for loop (the later is more efficient, but the former is good learning). Good luck.
I am watching AntiRTFM's YouTube tutorials, got a "crash course" book, and basically just trying everything that he talks about..

Then looking up other practice problems ..

So far I have been following the .. lets try this.. nope gave me the wrong answer.. ok how about this.. nope.. ok.. then i will finally get it.

But it just seems like theres got to be a better way?
Download/Buy (depending on budget) a good C++ book (btw there are very good "free" books online). Books are usually a lot better, or try the tut on this site: http://www.cplusplus.com/doc/tutorial/
Topic archived. No new replies allowed.