Problem fibo
User votesac
Submission Time 2024-03-22 15:07:28
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fibo.cpp: In function ‘void gatik(long long int)’:
fibo.cpp:9:15: error: assignment of function ‘void gatik(long long int)’
9 | gatik = 1;
| ~~~~~~^~~
fibo.cpp:12:21: error: invalid operands of types ‘void’ and ‘void’ to binary ‘operator+’
12 | cout<<gatik(n-1)+gatik(n-2);
| ~~~~~~~~~~^~~~~~~~~~~
| | |
| void void
fibo.cpp:13:12: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
13 | return gatik;
| ^~~~~
fibo.cpp: In function ‘int main()’:
fibo.cpp:19:10: error: no match for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘void’)
19 | cout << gatik(x);
| ~~~~ ^~ ~~~~~~~~
| | |
| | void
| std::ostream {aka std::basic_ostream<char>}
In fil