#2858
pv
Se consideră un șir a
1
, a
2
, …, a
n
de numere naturale.
10
.3
și aflate pe poziții impare.Problema | pv | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54115644 | Utilizator | |
Fișier | pv.cpp | Dimensiune | 514 B |
Data încărcării | 20 Noiembrie 2024, 09:04 | Scor / rezultat | Eroare de compilare |
pv.cpp: In function 'int main()': pv.cpp:8:10: error: expected initializer before '.' token int i.sp=0,spp=0,nr10=0,nr3=0; ^ pv.cpp:10:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ pv.cpp:14:13: error: 'sp' was not declared in this scope sp+=v[i]; ^ pv.cpp:16:13: error: 'spp' was not declared in this scope spp+=v[i]; ^ pv.cpp:18:13: error: 'nr10' was not declared in this scope nr10++; ^ pv.cpp:20:13: error: 'nr3' was not declared in this scope nr3+=v[i]; ^ pv.cpp:22:9: error: 'i' was not declared in this scope for(i=n;i>=1;i--) ^ pv.cpp:25:11: error: 'sp' was not declared in this scope cout<<sp<<endl<<spp<<endl<<nr10<<endl<<nr3<<endl; ^ pv.cpp:25:21: error: 'spp' was not declared in this scope cout<<sp<<endl<<spp<<endl<<nr10<<endl<<nr3<<endl; ^ pv.cpp:25:32: error: 'nr10' was not declared in this scope cout<<sp<<endl<<spp<<endl<<nr10<<endl<<nr3<<endl; ^ pv.cpp:25:44: error: 'nr3' was not declared in this scope cout<<sp<<endl<<spp<<endl<<nr10<<endl<<nr3<<endl; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pv 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ă.