I'm having a little difficulty, trying to transition from c++ to objective-c. I tried to write a fairly simple Fibbonacci sequence computer, which I usually write to familiarize myself with new languages. Unfortunately, it doesn't work. I keep getting errors related to either comparison between an int and a pointer, or about missing an lvalue increment operand.
I'm really frustrated!
Can someone please help? Pretty please?
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int input[0], fib = 0, bib = 1, Total = 1, i[0];
printf("How many numbers? => ");
scanf("%d", input);
for (*i = 0; i < input; *i++)
{
printf("%d", Total);
Total = fib + bib;
fib = bib;
bib = Total;
}
return 0;
}