#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 | #52928493 | Utilizator | |
Fișier | sortprime.cpp | Dimensiune | 705 B |
Data încărcării | 13 Octombrie 2024, 13:14 | Scor / rezultat | Eroare de compilare |
sortprime.cpp: In function 'int main()': sortprime.cpp:2:2: error: 'cin' was not declared in this scope {cin >> n; ^ sortprime.cpp:2:9: error: 'n' was not declared in this scope {cin >> n; ^ sortprime.cpp:5:16: error: 'x' was not declared in this scope cin >> x; ^ sortprime.cpp:6:9: error: 'c' was not declared in this scope c=0; ^ sortprime.cpp:18:13: error: 'v' was not declared in this scope v[i]=x; ^ sortprime.cpp:29:5: error: 'ok' was not declared in this scope ok=1; ^ sortprime.cpp:32:12: error: 'v' was not declared in this scope if(v[i] > v[i+1]) ^ sortprime.cpp:35:13: error: 'x' was not declared in this scope x=v[i]; ^ sortprime.cpp:41:7: error: 'ok' was not declared in this scope while(ok == 0); ^ sortprime.cpp:43:1: error: 'cout' was not declared in this scope cout << v[i] << " "; ^ sortprime.cpp:43:9: error: 'v' 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ă.