lab13-1 - int Fib(int N if(N==1 return 0 if(N==2 return 1...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; u int Fib(int); i int main() { int number; cin>>number; c cout<<Fib(number); c return 0;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } int Fib(int N) { if(N==1) return 0; if(N==2) return 1; else return Fib(N-1)+Fib(N-2); }...
View Full Document

This note was uploaded on 04/25/2010 for the course CECS CIS 150 taught by Professor L.tsui during the Fall '07 term at University of Michigan-Dearborn.

Ask a homework question - tutors are online