#891
Limba păsărească este foarte simplă; și asemănătoare cu limba română! Un text scris în română se traduce în păsărește astfel: după fiecare vocală se inserează litera p și vocala respectivă.
Se dă o propoziție scrisă în limba română. Să se traducă în păsărească.
| Problema | Pasareste | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64473293 | Utilizator | |
| Fișier | pasareste.cpp | Dimensiune | 317 B |
| Data încărcării | 09 Mai 2026, 10:36 | Scor/rezultat | Eroare de compilare |
pasareste.cpp:12:19: warning: character constant too long for its type 12 | if(strchr('aeiou',s)) | ^~~~~~~ pasareste.cpp: In function ‘int main()’: pasareste.cpp:12:18: error: no matching function for call to ‘strchr(int, char [260])’ 12 | if(strchr('aeiou',s)) | ~~~~~~^~~~~~~~~~~ In file included from /usr/include/c++/13/cstring:42, from pasareste.cpp:2: /usr/include/string.h:239:1: note: candidate: ‘const char* strchr(const char*, int)’ (near match) 239 | strchr (const char *__s, int __c) __THROW | ^~~~~~ /usr/include/string.h:239:1: note: conversion of argument 2 would be ill-formed: pasareste.cpp:12:27: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive] 12 | if(strchr('aeiou',s)) | ^ | | | char* /usr/include/string.h:233:1: note: candidate: ‘char* strchr(char*, int)’ (near match) 233 | strchr (char *__s, int __c) __THROW | ^~~~~~ /usr/include/string.h:233:1: note: conversion of argument 2 would be ill-formed: pasareste.cpp:12:27: error: invalid conversion from ‘char*’ to ‘int’ [-fpermissive] 12 | if(strchr('aeiou',s)) | ^ | | | char* pasareste.cpp:12:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 12 | if(strchr('aeiou',s)) | ^~ pasareste.cpp:14:30: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 14 | cout<<s[i]; i=i+2; | ^ pasareste.cpp:15:9: error: ‘else’ without a previous ‘if’ 15 | else | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Pasareste 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ă.