Need help with a "Compilation error" I'm unable to find my error. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 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.

23rd Sep 2017, 11:40 PM
Damiano Marsili
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]);
23rd Sep 2017, 11:45 PM
ChaoticDawg
ChaoticDawg - avatar