- 1
Need help with a "Compilation error" I'm unable to find my error.
https://code.sololearn.com/ceg1yA3NSsXE/?ref=app The program is supposed to Print the fibonacci number equivalent to the position inserted. The Scanner works but I receive a compilation error shortly after.
1 Answer
+ 2
These 2 lines:
int[] fib = {1,1,2,3,5,8,13,21,34,55,89,149,238,387,625,1012, 1637};
String res = String.valueOf(fib[fibPos]);