Borderou de evaluare (job #797861)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Suma cifrelor unui număr (clasa a 7-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 26 nov. 2024 17:57:06 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'long long int Sumcif(long long int&)':
main.cpp:12:29: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
12 | return n%10 + Sumcif(n/10);
| ~^~~
main.cpp:5:31: note: initializing argument 1 of 'long long int Sumcif(long long int&)'
5 | long long Sumcif(long long &n )
| ~~~~~~~~~~~~^