#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 | #53822934 | Utilizator | |
Fișier | sortprime.cpp | Dimensiune | 536 B |
Data încărcării | 12 Noiembrie 2024, 15:16 | Scor / rezultat | Eroare de compilare |
sortprime.cpp: In function 'int main()': sortprime.cpp:4:13: error: expected unqualified-id before '[' token int i,d,[1001],n,x,m,d,nd,md; ^ sortprime.cpp:5:10: error: 'n' was not declared in this scope cin>>n; ^ sortprime.cpp:8:14: error: 'x' was not declared in this scope cin>>x; ^ sortprime.cpp:12:13: error: 'md' was not declared in this scope md+=2; ^ sortprime.cpp:15:12: error: 'md' was not declared in this scope if(md==2) ^ sortprime.cpp:17:13: error: 'm' was not declared in this scope m++; ^ sortprime.cpp:18:13: error: 'a' was not declared in this scope a[m]=x; ^ sortprime.cpp:21:19: error: 'm' was not declared in this scope for(int i=1;i>m;i++) ^ sortprime.cpp:23:14: error: 'a' was not declared in this scope swap(a[i],a[i+1]); ^ sortprime.cpp:24:21: error: 'm' was not declared in this scope for( int i=1;i<=m;i++) ^ sortprime.cpp:25:15: error: 'a' was not declared in this scope cout<<a[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ă.