#972
Pozitii
Se dă un șir de caractere. Să se determine câte vocale din șir sunt cuprinse între două consoane.
Problema | Pozitii | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #20466591 | Utilizator | |
Fișier | pozitii.cpp | Dimensiune | 321 B |
Data încărcării | 31 Ianuarie 2020, 09:31 | Scor / rezultat | Eroare de compilare |
pozitii.cpp: In function 'int main()': pozitii.cpp:7:5: error: 'cin' was not declared in this scope cin.geline(s,100); ^ pozitii.cpp:8:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=1;i<strlen(s);i++){ ^ pozitii.cpp:9:31: error: call of overloaded 'strchr(char&, const char [6])' is ambiguous if(strchr(s[i],"aeiou")!=0 && strchr(s[i-1],"aeiou")==0 && strchr(s[i+1],"aeiou")==0){ ^ pozitii.cpp:9:31: note: candidates are: In file included from pozitii.cpp:2:0: /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 2 from 'const char [6]' to 'int' /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 2 from 'const char [6]' to 'int' pozitii.cpp:9:60: error: call of overloaded 'strchr(char&, const char [6])' is ambiguous if(strchr(s[i],"aeiou")!=0 && strchr(s[i-1],"aeiou")==0 && strchr(s[i+1],"aeiou")==0){ ^ pozitii.cpp:9:60: note: candidates are: In file included from pozitii.cpp:2:0: /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 2 from 'const char [6]' to 'int' /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 2 from 'const char [6]' to 'int' pozitii.cpp:9:89: error: call of overloaded 'strchr(char&, const char [6])' is ambiguous if(strchr(s[i],"aeiou")!=0 && strchr(s[i-1],"aeiou")==0 && strchr(s[i+1],"aeiou")==0){ ^ pozitii.cpp:9:89: note: candidates are: In file included from pozitii.cpp:2:0: /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 2 from 'const char [6]' to 'int' /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 2 from 'const char [6]' to 'int' pozitii.cpp:13:5: error: 'cout' was not declared in this scope cout<<c; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Pozitii 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ă.