#4382
Inlocuire5
Se citește un vector cu n
elemente, numere naturale. Să se înlocuiască fiecare element prim din vector cu 0
, apoi să se afișeze vectorul.
Problema | Inlocuire5 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54291721 | Utilizator | |
Fișier | inlocuire5.cpp | Dimensiune | 289 B |
Data încărcării | 25 Noiembrie 2024, 05:53 | Scor / rezultat | Eroare de compilare |
inlocuire5.cpp:2:7: error: expected nested-name-specifier before 'namcspace' using namcspace std; ^ inlocuire5.cpp:2:7: error: 'namcspace' has not been declared inlocuire5.cpp:2:17: error: expected ';' before 'std' using namcspace std; ^ inlocuire5.cpp:2:17: error: 'std' does not name a type inlocuire5.cpp:3:8: error: expected initializer before '/' token int n,v/1001],i,p,d; ^ inlocuire5.cpp: In function 'int main()': inlocuire5.cpp:5:1: error: 'cin' was not declared in this scope cin >> n; ^ inlocuire5.cpp:5:1: note: suggested alternative: In file included from inlocuire5.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ inlocuire5.cpp:6:5: error: 'i' was not declared in this scope for(i-1;i<=n;i++) ^ inlocuire5.cpp:7:7: error: 'v' was not declared in this scope cin >>v[i]; ^ inlocuire5.cpp:8:5: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ inlocuire5.cpp:10:1: error: 'p' was not declared in this scope p=1; ^ inlocuire5.cpp:11:4: error: 'v' was not declared in this scope if(v[i]<2) ^ inlocuire5.cpp:13:5: error: 'd' was not declared in this scope for(d=2;d*d<= v[i];d++) ^ inlocuire5.cpp:13:15: error: 'v' was not declared in this scope for(d=2;d*d<= v[i];d++) ^ inlocuire5.cpp:17:5: error: 'v' was not declared in this scope v[i]=0;} ^ inlocuire5.cpp:18:5: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ inlocuire5.cpp:19:1: error: 'cout' was not declared in this scope cout<<v[i]<<" "; ^ inlocuire5.cpp:19:1: note: suggested alternative: In file included from inlocuire5.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ inlocuire5.cpp:19:7: error: 'v' was not declared in this scope cout<<v[i]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Inlocuire5 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ă.