#975
Cuvinte2
Se dă o propoziție formată din litere mici ale alfabetului englez, spații și semnele de punctuație ,.
. Determinați un cuvânt palindrom din propoziție, primul în ordine alfabetică.
Problema | Cuvinte2 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50678783 | Utilizator | |
Fișier | cuvinte2.cpp | Dimensiune | 1.34 KB |
Data încărcării | 20 Aprilie 2024, 10:59 | Scor / rezultat | Eroare de compilare |
cuvinte2.cpp: In function 'int main()': cuvinte2.cpp:24:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(strlen(cuv[k])>lgmax) { ^ cuvinte2.cpp: At global scope: cuvinte2.cpp:39:11: error: redefinition of 'char s [256]' char s[256]; ^ cuvinte2.cpp:4:6: error: 'char s [256]' previously declared here char s[256]; ^ cuvinte2.cpp:40:16: error: redefinition of 'char cuv [50][20]' char cuv[50][20],cuvmax[20]; ^ cuvinte2.cpp:5:6: error: 'char cuv [50][20]' previously declared here char cuv[50][20],cuvmax[20]; ^ cuvinte2.cpp:40:27: error: redefinition of 'char cuvmax [20]' char cuv[50][20],cuvmax[20]; ^ cuvinte2.cpp:5:18: error: 'char cuvmax [20]' previously declared here char cuv[50][20],cuvmax[20]; ^ cuvinte2.cpp:41:5: error: redefinition of 'int i' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:5: error: 'int i' previously declared here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:41:7: error: redefinition of 'int j' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:7: error: 'int j' previously declared here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:41:9: error: redefinition of 'int linie' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:9: error: 'int linie' previously defined here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:41:17: error: redefinition of 'int k' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:17: error: 'int k' previously declared here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:41:19: error: redefinition of 'int ok' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:19: error: 'int ok' previously declared here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:41:22: error: redefinition of 'int lgmax' int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp:6:22: error: 'int lgmax' previously declared here int i,j,linie=0,k,ok,lgmax; ^ cuvinte2.cpp: In function 'int main()': cuvinte2.cpp:42:5: error: redefinition of 'int main()' int main() ^ cuvinte2.cpp:7:5: error: 'int main()' previously defined here int main() ^ cuvinte2.cpp:59:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(strlen(cuv[k])>lgmax) { ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvinte2 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ă.