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 | #62772037 | Utilizator | |
| Fișier | palindrompropozitie.cpp | Dimensiune | 682 B |
| Data încărcării | 02 Februarie 2026, 09:42 | Scor/rezultat | Eroare de compilare |
palindrompropozitie.cpp:3:1: error: 'ifstream' does not name a type ifstream.fin("palindrom.in"); ^ palindrompropozitie.cpp:4:1: error: 'ofstream' does not name a type ofstream.out("palindrom.out"); ^ palindrompropozitie.cpp: In function 'int palindrom(char*)': palindrompropozitie.cpp:8:22: error: 's' was not declared in this scope int i=0,j=strlen(s)-1; ^ palindrompropozitie.cpp:12:20: error: 'o' was not declared in this scope return o; ^ palindrompropozitie.cpp: In function 'int main()': palindrompropozitie.cpp:21:5: error: 'fin' was not declared in this scope fin>>n; ^ palindrompropozitie.cpp:26:9: error: expected ';' before 'for' for(j=0;j<strlen(s);j++) ^ palindrompropozitie.cpp:26:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(j=0;j<strlen(s);j++) ^ palindrompropozitie.cpp:26:18: warning: statement has no effect [-Wunused-value] for(j=0;j<strlen(s);j++) ^ palindrompropozitie.cpp:26:32: error: expected ';' before ')' token for(j=0;j<strlen(s);j++) ^ palindrompropozitie.cpp:30:13: error: 'fout' was not declared in this scope fout<<palindrom(1)<<endl; ^ palindrompropozitie.cpp:30:30: error: invalid conversion from 'int' to 'char*' [-fpermissive] fout<<palindrom(1)<<endl; ^ palindrompropozitie.cpp:6:5: error: initializing argument 1 of 'int palindrom(char*)' [-fpermissive] int palindrom (char [101]) ^ palindrompropozitie.cpp:35:5: error: 'fouy' was not declared in this scope fouy.close(); ^ palindrompropozitie.cpp:19:11: warning: unused variable 'p' [-Wunused-variable] char *p,s[201]; ^
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ă.