#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 | #53737808 | Utilizator | |
Fișier | pv.cpp | Dimensiune | 822 B |
Data încărcării | 10 Noiembrie 2024, 13:40 | Scor / rezultat | Eroare de compilare |
pv.cpp:2:5: error: 'cin' does not name a type cin>>n; ^ pv.cpp:3:5: error: expected unqualified-id before 'for' for (i=1;i<=n;i++) ^ pv.cpp:3:14: error: 'i' does not name a type for (i=1;i<=n;i++) ^ pv.cpp:3:19: error: 'i' does not name a type for (i=1;i<=n;i++) ^ pv.cpp:7:5: error: expected unqualified-id before 'for' for (i=n;i>=1;i--) ^ pv.cpp:7:14: error: 'i' does not name a type for (i=n;i>=1;i--) ^ pv.cpp:7:19: error: 'i' does not name a type for (i=n;i>=1;i--) ^ pv.cpp:11:9: error: 'cout' does not name a type cout<<'\n';///afisez invers elementele ^ pv.cpp:12:5: error: expected unqualified-id before 'for' for (i=1;i<=n;i++) ^ pv.cpp:12:14: error: 'i' does not name a type for (i=1;i<=n;i++) ^ pv.cpp:12:19: error: 'i' does not name a type for (i=1;i<=n;i++) ^ pv.cpp:17:9: error: 'cout' does not name a type cout<<sp<<'\n';///afisez suma nr pare ^ pv.cpp:18:5: error: expected unqualified-id before 'for' for (i=2;i<=n;i=i+2) ^ pv.cpp:18:14: error: 'i' does not name a type for (i=2;i<=n;i=i+2) ^ pv.cpp:18:19: error: 'i' does not name a type for (i=2;i<=n;i=i+2) ^ pv.cpp:23:5: error: 'cout' does not name a type cout<<spp<<'\n'; ^ pv.cpp:24:5: error: expected unqualified-id before 'for' for(i=1;i<=n;i++) ^ pv.cpp:24:13: error: 'i' does not name a type for(i=1;i<=n;i++) ^ pv.cpp:24:18: error: 'i' does not name a type for(i=1;i<=n;i++) ^ pv.cpp:29:5: error: 'cout' does not name a type cout<<nr10<<'\n'; ^ pv.cpp:30:5: error: expected unqualified-id before 'for' for (i=1;i<=n;i=i+2) ^ pv.cpp:30:14: error: 'i' does not name a type for (i=1;i<=n;i=i+2) ^ pv.cpp:30:19: error: 'i' does not name a type for (i=1;i<=n;i=i+2) ^ pv.cpp:35:5: error: 'cout' does not name a type cout<<s3<<'\n'; ^ pv.cpp:36:5: error: expected unqualified-id before 'return' return 0; ^ pv.cpp:37:1: error: expected declaration before '}' token } ^
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ă.