#973
Cuvinte1
Se dă o propoziție care conține numai litere mici ale alfabetului englez și spații. Să se afișeze cuvintele din propoziție care conțin numai vocale.
Problema | Cuvinte1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #5083943 | Utilizator | |
Fișier | cuvinte1.cpp | Dimensiune | 294 B |
Data încărcării | 02 Mai 2017, 15:42 | Scor / rezultat | Eroare de compilare |
cuvinte1.cpp:11:37: warning: character constant too long for its type [enabled by default] if ((strchr(v,s[i])&&strchr('qwrtypsdfgjkhlzxcvbmn', s[i]==NULL)) ^ cuvinte1.cpp: In function 'int main()': cuvinte1.cpp:10:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=1;i<strlen(s);i++) ^ cuvinte1.cpp:11:68: warning: NULL used in arithmetic [-Wpointer-arith] if ((strchr(v,s[i])&&strchr('qwrtypsdfgjkhlzxcvbmn', s[i]==NULL)) ^ cuvinte1.cpp:11:72: error: call of overloaded 'strchr(int, bool)' is ambiguous if ((strchr(v,s[i])&&strchr('qwrtypsdfgjkhlzxcvbmn', s[i]==NULL)) ^ cuvinte1.cpp:11:72: note: candidates are: In file included from /usr/include/c++/4.8/cstring:42:0, from cuvinte1.cpp:2: /usr/include/string.h:223:1: note: char* strchr(char*, int) <near match> strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: no known conversion for argument 1 from 'int' to 'char*' /usr/include/string.h:229:1: note: const char* strchr(const char*, int) <near match> strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: no known conversion for argument 1 from 'int' to 'const char*' cuvinte1.cpp:12:5: error: expected ')' before 'cout' cout<<s[i]<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cuvinte1 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ă.