#236
Fişierul text sort2.in conţine, dispuse pe mai multe linii, cel mult 100 de numere naturale, cu cel mult 4 cifre fiecare. Să se afişeze în fişierul sort2.out, în ordine crescătoare, toate numerele din fişierul sort2.in care au cel mult 2 cifre.
Variante Bacalaureat 2009
| Problema | Sort2 | Operații I/O |
sort2.in/sort2.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63258337 | Utilizator | |
| Fișier | sort2.cpp | Dimensiune | 641 B |
| Data încărcării | 23 Februarie 2026, 21:04 | Scor/rezultat | Eroare de compilare |
sort2.cpp:4:1: error: stray '\342' in program ifstream f(“sort2.in”); ^ sort2.cpp:4:1: error: stray '\200' in program sort2.cpp:4:1: error: stray '\234' in program sort2.cpp:4:1: error: stray '\342' in program sort2.cpp:4:1: error: stray '\200' in program sort2.cpp:4:1: error: stray '\235' in program sort2.cpp:5:1: error: stray '\342' in program ofstream g(“sort2.out”); ^ sort2.cpp:5:1: error: stray '\200' in program sort2.cpp:5:1: error: stray '\234' in program sort2.cpp:5:1: error: stray '\342' in program sort2.cpp:5:1: error: stray '\200' in program sort2.cpp:5:1: error: stray '\235' in program sort2.cpp:18:9: error: stray '\342' in program g << “NU EXISTA”; ^ sort2.cpp:18:9: error: stray '\200' in program sort2.cpp:18:9: error: stray '\234' in program sort2.cpp:18:9: error: stray '\342' in program sort2.cpp:18:9: error: stray '\200' in program sort2.cpp:18:9: error: stray '\235' in program sort2.cpp:29:9: error: stray '\342' in program g << v[i] << “ “; ^ sort2.cpp:29:9: error: stray '\200' in program sort2.cpp:29:9: error: stray '\234' in program sort2.cpp:29:9: error: stray '\342' in program sort2.cpp:29:9: error: stray '\200' in program sort2.cpp:29:9: error: stray '\234' in program sort2.cpp:4:15: error: 'sort2' was not declared in this scope ifstream f(“sort2.in”); ^ sort2.cpp:5:15: error: 'sort2' was not declared in this scope ofstream g(“sort2.out”); ^ sort2.cpp: In function 'int main()': sort2.cpp:18:17: error: 'NU' was not declared in this scope g << “NU EXISTA”; ^ sort2.cpp:18:20: error: expected ';' before 'EXISTA' g << “NU EXISTA”; ^ sort2.cpp:29:29: error: expected primary-expression before ';' token g << v[i] << “ “; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Sort2 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ă.