#972
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 | #64723814 | Utilizator | |
| Fișier | pozitii.cpp | Dimensiune | 388 B |
| Data încărcării | 26 Mai 2026, 09:48 | Scor/rezultat | Eroare de compilare |
pozitii.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> 1 | #include iostream> | ^~~~~~~~ pozitii.cpp: In function ‘int main()’: pozitii.cpp:13:5: error: ‘cin’ was not declared in this scope 13 | cin>>c; | ^~~ pozitii.cpp:3:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’? 2 | #include <cstring> +++ |+#include <iostream> 3 | using namespace std; pozitii.cpp:16:19: warning: array subscript has type ‘char’ [-Wchar-subscripts] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~^ pozitii.cpp:16:20: warning: pointer to a function used in arithmetic [-Wpointer-arith] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ^ pozitii.cpp:16:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~~~~~~~^~~ pozitii.cpp:16:37: warning: array subscript has type ‘char’ [-Wchar-subscripts] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~~~^ pozitii.cpp:16:38: warning: pointer to a function used in arithmetic [-Wpointer-arith] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ^ pozitii.cpp:16:39: warning: comparing the result of pointer addition ‘(ver + ((sizetype)c[(i + -1)]))’ and NULL [-Waddress] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~~~~~~~~~^~~ pozitii.cpp:16:55: warning: array subscript has type ‘char’ [-Wchar-subscripts] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~~~^ pozitii.cpp:16:56: warning: pointer to a function used in arithmetic [-Wpointer-arith] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ^ pozitii.cpp:16:57: warning: comparing the result of pointer addition ‘(ver + ((sizetype)c[(i + 1)]))’ and NULL [-Waddress] 16 | if(ver[c[i]]==1 && ver[c[i-1]]==0 && ver[c[i+1]]==0) | ~~~~~~~~~~~^~~ pozitii.cpp:19:5: error: ‘cout’ was not declared in this scope 19 | cout<<ans; | ^~~~ pozitii.cpp:19:5: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
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ă.