#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 | #21865745 | Utilizator | |
Fișier | pozitii.cpp | Dimensiune | 328 B |
Data încărcării | 16 Martie 2020, 21:03 | Scor / rezultat | Eroare de compilare |
pozitii.cpp: In function 'int main()': pozitii.cpp:11:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(i=0;i<strlen(s);i++) ^ pozitii.cpp:14:19: error: no matching function for call to 'strchr(char&)' if(strchr(s[i])=="aeiou" && strchr(s[i-1])=="bcdfghjklmnpqrstvwxyz" && strchr(s[i+1])=="bcdfghjklmnpqrstvwxyz") ^ pozitii.cpp:14:19: note: candidates are: In file included from pozitii.cpp:2:0: /usr/include/string.h:223:1: note: char* strchr(char*, int) strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: candidate expects 2 arguments, 1 provided /usr/include/string.h:229:1: note: const char* strchr(const char*, int) strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: candidate expects 2 arguments, 1 provided pozitii.cpp:14:46: error: no matching function for call to 'strchr(char&)' if(strchr(s[i])=="aeiou" && strchr(s[i-1])=="bcdfghjklmnpqrstvwxyz" && strchr(s[i+1])=="bcdfghjklmnpqrstvwxyz") ^ pozitii.cpp:14:46: note: candidates are: In file included from pozitii.cpp:2:0: /usr/include/string.h:223:1: note: char* strchr(char*, int) strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: candidate expects 2 arguments, 1 provided /usr/include/string.h:229:1: note: const char* strchr(const char*, int) strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: candidate expects 2 arguments, 1 provided pozitii.cpp:14:89: error: no matching function for call to 'strchr(char&)' if(strchr(s[i])=="aeiou" && strchr(s[i-1])=="bcdfghjklmnpqrstvwxyz" && strchr(s[i+1])=="bcdfghjklmnpqrstvwxyz") ^ pozitii.cpp:14:89: note: candidates are: In file included from pozitii.cpp:2:0: /usr/include/string.h:223:1: note: char* strchr(char*, int) strchr (char *__s, int __c) __THROW ^ /usr/include/string.h:223:1: note: candidate expects 2 arguments, 1 provided /usr/include/string.h:229:1: note: const char* strchr(const char*, int) strchr (const char *__s, int __c) __THROW ^ /usr/include/string.h:229:1: note: candidate expects 2 arguments, 1 provided
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ă.