Description: Write a recursive function calculation Fibonacci sequence, to avoid double counting input: input.txt contains only an integer n (0-90) output: the program should be able to check the input legitimacy, any errors in the output error " WRONG" Otherwise, output F (n). In both cases, output a carriage return (form a blank line). All instances should be within 30 seconds to output the result. Tip: available an array to save the Fibonacci sequence, with a special value that has not yet calculated the Fibonacci numbers, before the recursive call to check array, if you calculate, direct access to the recursive call if not calculated to call recursive function to calculate completed and saved into the array. In fact, this approach has been the F (1)-F (n), not only is F (n). In addition, note that the range of data types. VC 6.0, long integer LONGLONG, its output I64d.
To Search:
File list (Check if you may need any files):
zuoye11.cpp