#4861
Se citește de la tastatură un număr natural n de 3 cifre. Să se verifice dacă numărul citit este un palindrom.
| Problema | pal3 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64239841 | Utilizator | |
| Fișier | pal3.cpp | Dimensiune | 246 B |
| Data încărcării | 24 Aprilie 2026, 17:26 | Scor/rezultat | Eroare de compilare |
pal3.cpp: In function ‘int main()’: pal3.cpp:5:8: error: expected unqualified-id before ‘>>’ token 5 | { int>>a,b,c,n; | ^~ pal3.cpp:7:6: warning: statement has no effect [-Wunused-value] 7 | c==n%10; | ~^~~~~~ pal3.cpp:8:6: warning: statement has no effect [-Wunused-value] 8 | b==n/10%10; | ~^~~~~~~~~ pal3.cpp:9:6: warning: statement has no effect [-Wunused-value] 9 | a==n/100; | ~^~~~~~~ pal3.cpp:11:15: error: ‘da’ was not declared in this scope; did you mean ‘a’? 11 | cout<<da endl; | ^~ | a pal3.cpp:10:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(a==b&&b==c) | ^~ pal3.cpp:12:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | elsecout<<nu endl; | ^~~~~~~~ pal3.cpp:12:9: error: ‘elsecout’ was not declared in this scope pal3.cpp:12:19: error: ‘nu’ was not declared in this scope; did you mean ‘nr’? 12 | elsecout<<nu endl; | ^~ | nr pal3.cpp:13:16: error: ‘o’ was not declared in this scope 13 | return o; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pal3 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.