#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 | #53580087 | Utilizator | |
Fișier | pozitii.cpp | Dimensiune | 921 B |
Data încărcării | 05 Noiembrie 2024, 17:44 | Scor / rezultat | Eroare de compilare |
pozitii.cpp:15:74: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:86: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:100: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:303: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:330: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:585: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:612: warning: multi-character character constant [-Wmultichar] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp: In function 'int main()': pozitii.cpp:15:90: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:387: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:15:399: error: lvalue required as left operand of assignment if (a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='ă'||a[i]=='î'||a[i] == 'â' && a[i - 1] = 'b' || a[i-1]=='c'||a[i-1]=='d'||a[i-1]=='f'||a[i-1]=='g'||a[i-1]=='h'||a[i-1]=='j'||a[i-1]=='k'||a[i-1]=='l'||a[i-1]=='m'||a[i-1]=='n'||a[i-1]=='p'||a[i-1]=='q'||a[i-1]=='r'||a[i-1]=='ș'||a[i-1]=='t'||a[i-1]=='ț'||a[i-1]=='v'||a[i-1]=='x'||a[i-1]=='y'||a[i-1]=='z' && a[i + 1] = 'b' || a[i+1]=='c'||a[i+1]=='d'||a[i+1]=='f'||a[i+1]=='g'||a[i+1]=='h'||a[i+1]=='j'||a[i+1]=='k'||a[i+1]=='l'||a[i+1]=='m'||a[i+1]=='n'||a[i+1]=='p'||a[i+1]=='q'||a[i+1]=='r'||a[i+1]=='ș'||a[i+1]=='t'||a[i+1]=='ț'||a[i+1]=='v'||a[i+1]=='x'||a[i+1]=='y'||a[i+1]=='z') ^ pozitii.cpp:17:9: error: expected ';' before ')' token ) ^
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ă.