#510
SortPrime
Se dă un vector cu n
elemente, numere naturale. Afișați în ordine crescătoare valorile prime din vector.
Problema | SortPrime | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54080982 | Utilizator | |
Fișier | sortprime.cpp | Dimensiune | 376 B |
Data încărcării | 19 Noiembrie 2024, 12:34 | Scor / rezultat | Eroare de compilare |
sortprime.cpp: In function 'int main()': sortprime.cpp:6:1: error: expected initializer before 'cin' cin>>n; ^ sortprime.cpp:8:6: error: 'v' was not declared in this scope cin>>v[i]; ^ sortprime.cpp:11:4: error: 'v' was not declared in this scope if(v[i]>v[j])nclude <stdio.h> ^ sortprime.cpp:11:14: error: 'nclude' was not declared in this scope if(v[i]>v[j])nclude <stdio.h> ^ sortprime.cpp:11:22: error: 'stdio' was not declared in this scope if(v[i]>v[j])nclude <stdio.h> ^ sortprime.cpp:13:1: error: expected primary-expression before '{' token {aux=v[i]; ^ sortprime.cpp:13:1: error: expected ';' before '{' token sortprime.cpp:19:7: error: 'v' was not declared in this scope int x=v[i]; ^ sortprime.cpp:19:5: warning: unused variable 'x' [-Wunused-variable] int x=v[i]; ^ sortprime.cpp:20:1: error: 'y' was not declared in this scope y=v[j]; ^ sortprime.cpp:20:3: error: 'v' was not declared in this scope y=v[j]; ^ sortprime.cpp:20:5: error: 'j' was not declared in this scope y=v[j]; ^ sortprime.cpp:24:8: error: 'x' was not declared in this scope {int r=x%y; ^ sortprime.cpp:28:4: error: 'x' was not declared in this scope if(x==1) ^ sortprime.cpp:29:9: error: 'i' was not declared in this scope cout<<v[i]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortPrime 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ă.