Borderou de evaluare (job #802296)

Utilizator avatar bogdan_ Goian Bogdan bogdan_ IP ascuns
Problemă Factoriale1 (clasa a 7-a) Compilator cpp-32
Rundă Arhiva de probleme Status evaluat
Dată 4 ian. 2025 12:47:55 Scor 0

Raport evaluator

Eroare de compilare: main.cpp: In function 'std::string factorial(int)': main.cpp:5:10: error: 'f' was not declared in this scope 5 | {f[0]=f[1]="1"; | ^ main.cpp:11:13: error: 'R' was not declared in this scope 11 | R=char(d%10+'0')+R; | ^ main.cpp:15:26: error: 'R' was not declared in this scope 15 | {R=char(c%10+'0')+R; | ^ main.cpp:18:9: error: 'R' was not declared in this scope 18 | R=S; | ^ main.cpp:20:13: error: 'R' was not declared in this scope 20 | return R; | ^ main.cpp: In function 'int main()': main.cpp:24:14: error: too few arguments to function 'std::string factorial(int)' 24 | factorial(); | ~~~~~~~~~^~ main.cpp:4:8: note: declared here 4 | string factorial(int n) | ^~~~~~~~~ main.cpp:23:17: warning: unused variable 'x' [-Wunused-variable] 23 | {int n, x; | ^