Tuesday, September 25, 2012

Taking C++

    I've been taking the C++ 201 class at my college this semester. It has really helped with my grasp of not only the language, but the thought process of programming as well.

    A few weeks ago we worked on a problem that required the use of the Fibonacci algorithm. It was worded very awkwardly in the text. I found that drawing it out greatly helped in my understanding of the problem. 

    Two things about the image: I probably should have swapped the place of the 0 and 1 in the first line, and as far as programming is concerned, the variables are backwards. When writing this out it actually becomes:
A=B
C=A
C=A+B




    I've actually given this image to other students in my class and it seems to have helped them with the exercise as well.

No comments:

Post a Comment