Morgan Stanley Interview Question
Software Engineer / Developersint fibonacci(int i){
if((i==1)||(i==2))
return 1;
else
return (fibonacci(i-1)+fibonacci(i-2));
}
void main(){
cout << fibonacci(6);
}
Read the question again:
"code up a Fibonacci function with the one constraint being that I COULDN'T write a RECURSIVE function"
- Anonymous March 15, 2007