#992
NrVocale1
Se dă un şir cu cel mult 255
de caractere. Să se determine câte vocale conţine.
Se va defini şi utiliza subprogramul apcar
, cu doi parametri:
s
– un şir cu cel mult 255
de caracterec
– un caractercare returnează numărul de apariţii ale caracterului c
în şirul s
.
Problema | NrVocale1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52871675 | Utilizator | |
Fișier | nrvocale1.cpp | Dimensiune | 563 B |
Data încărcării | 11 Octombrie 2024, 11:53 | Scor / rezultat | Eroare de compilare |
nrvocale1.cpp:12:9: error: stray '\342' in program if (s[i]==‘a’ or s[i]==‘e’ or s[i]==‘i’ or s[i]==‘o’ or s[i]==‘u’) ^ nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\230' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\231' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\230' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\231' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\230' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\231' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\230' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\231' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\230' in program nrvocale1.cpp:12:9: error: stray '\342' in program nrvocale1.cpp:12:9: error: stray '\200' in program nrvocale1.cpp:12:9: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program if (s[i-1]!=‘a’ && s[i-1]!=‘e’ && s[i-1]!=‘i’ && s[i-1]!=‘o’ && s[i-1]!=‘u’ && s[i-1]!=’ ‘) ^ nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\231' in program nrvocale1.cpp:13:7: error: stray '\342' in program nrvocale1.cpp:13:7: error: stray '\200' in program nrvocale1.cpp:13:7: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program if (s[i+1]!=‘a’ && s[i+1]!=‘e’ && s[i+1]!=‘i’ && s[i+1]!=‘o’ && s[i+1]!=‘u’ && s[i+1]!=’ ‘) ^ nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\231' in program nrvocale1.cpp:14:1: error: stray '\342' in program nrvocale1.cpp:14:1: error: stray '\200' in program nrvocale1.cpp:14:1: error: stray '\230' in program nrvocale1.cpp: In function 'int main()': nrvocale1.cpp:6:26: error: 's' was not declared in this scope { char s270; cin.getline(s,270); ^ nrvocale1.cpp:12:22: error: 'a' was not declared in this scope if (s[i]==‘a’ or s[i]==‘e’ or s[i]==‘i’ or s[i]==‘o’ or s[i]==‘u’) ^ nrvocale1.cpp:12:39: error: 'e' was not declared in this scope if (s[i]==‘a’ or s[i]==‘e’ or s[i]==‘i’ or s[i]==‘o’ or s[i]==‘u’) ^ nrvocale1.cpp:12:73: error: 'o' was not declared in this scope if (s[i]==‘a’ or s[i]==‘e’ or s[i]==‘i’ or s[i]==‘o’ or s[i]==‘u’) ^ nrvocale1.cpp:12:90: error: 'u' was not declared in this scope if (s[i]==‘a’ or s[i]==‘e’ or s[i]==‘i’ or s[i]==‘o’ or s[i]==‘u’) ^ nrvocale1.cpp:13:121: error: expected primary-expression before ')' token if (s[i-1]!=‘a’ && s[i-1]!=‘e’ && s[i-1]!=‘i’ && s[i-1]!=‘o’ && s[i-1]!=‘u’ && s[i-1]!=’ ‘) ^ nrvocale1.cpp:14:115: error: expected primary-expression before ')' token if (s[i+1]!=‘a’ && s[i+1]!=‘e’ && s[i+1]!=‘i’ && s[i+1]!=‘o’ && s[i+1]!=‘u’ && s[i+1]!=’ ‘) ^ nrvocale1.cpp:6:8: warning: unused variable 's270' [-Wunused-variable] { char s270; cin.getline(s,270); ^ nrvocale1.cpp:9:10: warning: unused variable 'consoana' [-Wunused-variable] int k=0, consoana=0, v=-1,c=-1; ^ nrvocale1.cpp:9:22: warning: unused variable 'v' [-Wunused-variable] int k=0, consoana=0, v=-1,c=-1; ^ nrvocale1.cpp:9:27: warning: unused variable 'c' [-Wunused-variable] int k=0, consoana=0, v=-1,c=-1; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema NrVocale1 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ă.