Să se verifice dacă o propoziție dată este palindromică.
| Problema | PalindromPropozitie | Operații I/O |
palindrom.in/palindrom.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #60533720 | Utilizator | |
| Fișier | palindrompropozitie.cpp | Dimensiune | 722 B |
| Data încărcării | 04 Noiembrie 2025, 14:55 | Scor/rezultat | Eroare de compilare |
palindrompropozitie.cpp: In function 'bool lit(char)': palindrompropozitie.cpp:5:20: error: expected primary-expression before '%' token return c>= 'a'%% c<='z'; ^ palindrompropozitie.cpp: In function 'void palin(char*)': palindrompropozitie.cpp:9:10: error: redeclaration of 'int i' int i=-1; ^ palindrompropozitie.cpp:8:10: error: 'int i' previously declared here int i, j; ^ palindrompropozitie.cpp:20:10: error: expected ';' before '}' token }while (i<j && s[i]==s[j]); ^ palindrompropozitie.cpp:21:21: error: return-statement with a value, in function returning 'void' [-fpermissive] return(i>=j); ^ palindrompropozitie.cpp: In function 'int main()': palindrompropozitie.cpp:32:4: error: expected ',' or ';' before 'ofstream' ofstream fout ("palidrom.out") ^ palindrompropozitie.cpp:37:8: error: 'fout' was not declared in this scope fout<< palin(s)<< '\n' ^ palindrompropozitie.cpp:38:4: error: expected ';' before '}' token } ^ palindrompropozitie.cpp: In function 'bool lit(char)': palindrompropozitie.cpp:6:1: warning: control reaches end of non-void function [-Wreturn-type] } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PalindromPropozitie 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ă.