#85
Să se scrie un program care citește un text și inserează după fiecare vocală caracterul *.
| Problema | InserareAsterisc | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64371100 | Utilizator | |
| Fișier | inserareasterisc.cpp | Dimensiune | 424 B |
| Data încărcării | 04 Mai 2026, 09:09 | Scor/rezultat | 0 puncte |
inserareasterisc.cpp: In function ‘int main()’: inserareasterisc.cpp:12:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 12 | if(strchr("aeiou",s[i])!=0) | ^~ inserareasterisc.cpp:14:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | s[i]=s[i-1]; | ^ inserareasterisc.cpp:18:11: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare] 18 | for(i=0;i<strlen(s);i++) | ~^~~~~~~~~~ inserareasterisc.cpp:18:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 18 | for(i=0;i<strlen(s);i++) | ^~~ inserareasterisc.cpp:23:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 23 | return 0; | ^~~~~~ inserareasterisc.cpp:9:17: warning: variable ‘x’ set but not used [-Wunused-but-set-variable] 9 | char s[1001],x; | ^ inserareasterisc.cpp:14:19: warning: array subscript -2 is below array bounds of ‘char [1001]’ [-Warray-bounds=] 14 | s[i]=s[i-1]; | ~~~~~^ inserareasterisc.cpp:9:9: note: while referencing ‘s’ 9 | char s[1001],x; | ^ inserareasterisc.cpp:14:12: warning: array subscript -1 is below array bounds of ‘char [1001]’ [-Warray-bounds=] 14 | s[i]=s[i-1]; | ~~~^ inserareasterisc.cpp:9:9: note: while referencing ‘s’ 9 | char s[1001],x; | ^ inserareasterisc.cpp:15:14: warning: array subscript -2 is below array bounds of ‘char [1001]’ [-Warray-bounds=] 15 | s[i-1]='*'; | ~~~~~^ inserareasterisc.cpp:9:9: note: while referencing ‘s’ 9 | char s[1001],x; | ^
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.002 secunde | Raspuns gresit. | 10 | 0 | Exemplu | |
| 2 | 0.002 secunde | Raspuns gresit. | 30 | 0 | ||
| 3 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| 4 | 0.001 secunde | Raspuns gresit. | 30 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema InserareAsterisc 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ă.