As mentioned in a previous post, I am learning to develop for the iPhone and needed an app to get my feet wet. The idea of the app came from my 9 year old daughter.
It was a prefect app to get my feet wet and was fun to make. It is a fart app (yes, there are a million of them and no, they are not real farts) but was a good way to break the ice and understand the app store submission process, which was not a great experience. Apple felt the first version was too risky (animated bum). The version that is in the iTunes store is not nearly as funny as the original but, if you are a kid at heart or just like slap stick, it will put a smile on your face. My daughter loves it.
You can download it for free from the iTunes store. If you download it, please rate it. : )
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:
int i; // used in the "for" loop
int fcounter = 20; // specifies the number of values to loop through
int f1 = 1; // seed value 1
int f2 = 0; // seed value 2
int fn; // used as a holder for each new value in the loop
for (i=1; i<fcounter; i++){
fn = f1 + f2;
f1 = f2;
f2 = fn;
printf("%d: ", fn); // print each value of fn
}
The Answer:
1: 1: 2: 3: 5: 8: 13: 21: 34: 55: 89: 144: 233: 377: 610: 987: 1597: 2584: 4181: