Tag Archives: Objective-C

Objective-C and “For Loop” with Fibonacci

I am in the process of learning to develop for the iPhone and of course the primary language is Objective-C.

One of my first assignments after an introduction to Objective-C was to create several console type apps. One of which was to display the first 20 values of the Fibonacci sequence.

I had no clue what Fibonacci was/is until Wikipedia explained it to me (see link). In the end, I was able to figure out the formula and put it in code.

The Code:

The Answer: