#546
Se citește un vector cu n elemente, numere naturale. Să se afișeze elementele din vector care sunt multipli ai ultimului element.
| Problema | Afisare0 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64509161 | Utilizator | |
| Fișier | afisare0.cpp | Dimensiune | 202 B |
| Data încărcării | 11 Mai 2026, 20:07 | Scor/rezultat | Eroare de compilare |
afisare0.cpp: In function ‘int main()’: afisare0.cpp:8:10: error: ‘v’ was not declared in this scope 8 | cin>>v[i]; | ^ afisare0.cpp:9:8: warning: init-statement in selection statements only available with ‘-std=c++17’ or ‘-std=gnu++17’ [-Wc++17-extensions] 9 | if(int j=0; v[n-1]/v[j]==0;j++) | ^~~ afisare0.cpp:9:17: error: ‘v’ was not declared in this scope 9 | if(int j=0; v[n-1]/v[j]==0;j++) | ^ afisare0.cpp:9:31: error: expected ‘)’ before ‘;’ token 9 | if(int j=0; v[n-1]/v[j]==0;j++) | ~ ^ | ) afisare0.cpp:9:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 9 | if(int j=0; v[n-1]/v[j]==0;j++) | ^~ afisare0.cpp:9:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 9 | if(int j=0; v[n-1]/v[j]==0;j++) | ^ afisare0.cpp:9:32: error: ‘j’ was not declared in this scope
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Afisare0 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ă.