Problem | fibo |
---|---|
User | Ningja |
Submission Time | 2023-11-10 11:41:58 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
fibo.cpp:5:1: error: ‘num’ does not name a type
5 | num[0] = 0;
| ^~~
fibo.cpp:6:1: error: ‘num’ does not name a type
6 | num[1] = 1;
| ^~~
fibo.cpp: In function ‘int fibo(int)’:
fibo.cpp:9:5: error: expected ‘(’ before ‘n’
9 | if n==1 return 1;
| ^
| (
fibo.cpp:10:5: error: expected ‘(’ before ‘n’
10 | if n==0 return 0;
| ^
| (
fibo.cpp:13:25: error: expected ‘;’ before ‘num’
13 | ans = num[n-2]+num[n-1]
| ^
| ;
14 | num[n] = ans
| ~~~
fibo.cpp: In function ‘int main()’:
fibo.cpp:21:17: error: expected ‘;’ before ‘<=’ token
21 | for (int i=1, i<=fib, i++) {
| ^~
| ;
fibo.cpp:21:17: error: expected primary-expression before ‘<=’ token
21 | for (int i=1, i<=fib, i++) {
|