#188
InlocuireCuvant
Se dau două cuvinte şi o propoziţie. Să se înlocuiască în propoziţie fiecare apariţie a primului cuvânt cu al doilea.
Problema | InlocuireCuvant | Operații I/O |
inlocuirecuvant.in /inlocuirecuvant.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51820732 | Utilizator | |
Fișier | inlocuirecuvant.cpp | Dimensiune | 2.58 KB |
Data încărcării | 25 August 2024, 11:52 | Scor / rezultat | Eroare de compilare |
inlocuirecuvant.cpp: In function 'int vocala(char)': inlocuirecuvant.cpp:22:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<=strlen(s)-1;i++) ^ inlocuirecuvant.cpp: In function 'void deletee(char*, int, int)': inlocuirecuvant.cpp:41:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=left,j=right;j<=strlen(s);i++,j++) ^ inlocuirecuvant.cpp: In function 'int non_litera(char*, int)': inlocuirecuvant.cpp:47:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=left+1;i<=strlen(s)-1;i++) ^ inlocuirecuvant.cpp: In function 'void afisare_fara_litera(char*, int)': inlocuirecuvant.cpp:65:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=poz+1;i<=strlen(s)-1;i++) ^ inlocuirecuvant.cpp: In function 'int litera_sir(char*, int)': inlocuirecuvant.cpp:71:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=left+1;i<=strlen(s)-1;i++) ^ inlocuirecuvant.cpp: In function 'int nr_cuv(char*)': inlocuirecuvant.cpp:80:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i=0;i<=strlen(s)-1;i++){ ^ inlocuirecuvant.cpp: In function 'int verificare(char*, char*, int, int)': inlocuirecuvant.cpp:89:31: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (strlen(a)!=right-left+1) ^ inlocuirecuvant.cpp: In function 'int main()': inlocuirecuvant.cpp:109:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (left=0;left<=strlen(s)-1;left++){ ^ inlocuirecuvant.cpp:120:1: error: expected '}' at end of input } ^ inlocuirecuvant.cpp:104:9: warning: unused variable 'i' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:11: warning: unused variable 'j' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:24: warning: unused variable 'cnt' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:30: warning: unused variable 'left2' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:36: warning: unused variable 'right2' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:43: warning: unused variable 'nr' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:46: warning: unused variable 'index' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:104:54: warning: unused variable 'sortare' [-Wunused-variable] int i,j,left,right,cnt=0,left2,right2,nr,index=0,sortare=1; ^ inlocuirecuvant.cpp:120:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InlocuireCuvant 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ă.