Borderou de evaluare (job #3220885)

Utilizator bogdan1479Luca Bogdan Alexandru bogdan1479 Data 5 aprilie 2024 09:55:33
Problema Al k-lea termen Fibonacci Status done
Runda Arhiva educationala Compilator cpp-64 | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: main.cpp:6:13: error: variable 'std::ifstream fin' has initializer but incomplete type 6 | ifstream fin("kfib.in"); | ^ main.cpp:7:14: error: variable 'std::ofstream fout' has initializer but incomplete type 7 | ofstream fout("kfib.out"); | ^ main.cpp: In function 'int Fibonacci(int)': main.cpp:27:14: error: expected ',' or ';' before 'f1' 27 | int f0=0 f1=1, f2; | ^~ main.cpp:30:9: error: 'f2' was not declared in this scope; did you mean 'f0'? 30 | f2=(f0+f1)%MOD; | ^~ | f0 main.cpp:30:16: error: 'f1' was not declared in this scope; did you mean 'f0'? 30 | f2=(f0+f1)%MOD; | ^~ | f0 main.cpp:34:12: error: 'f1' was not declared in this scope; did you mean 'f0'? 34 | return f1; | ^~ | f0 main.cpp: In function 'int main()': main.cpp:41:23: error: 'p' was not declared in this scope 41 | fout<<Fibonacci(k%p); | ^ Non zero exit status: 1

Ceva nu functioneaza?