#247
Se dau mai multe numere naturale, fiecare cu cel mult 9 cifre. Să se afişeze, în ordine descrescătoare, toate cifrele care apar în numerele date.
Variante Bacalaureat 2009
| Problema | CifreOrd1 | Operații I/O |
cifreord1.in/cifreord1.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #63633468 | Utilizator | |
| Fișier | cifreord1.cpp | Dimensiune | 521 B |
| Data încărcării | 12 Martie 2026, 09:04 | Scor/rezultat | Eroare de compilare |
cifreord1.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout("cifreord1.out") ^ cifreord1.cpp:6:15: error: expected unqualified-id before ',' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp:6:17: error: expected constructor, destructor, or type conversion before ',' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp:6:19: error: expected constructor, destructor, or type conversion before ',' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp:6:22: error: expected constructor, destructor, or type conversion before ',' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp:6:24: error: expected constructor, destructor, or type conversion before ',' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp:6:32: error: expected constructor, destructor, or type conversion before ';' token int fr[10]={0},i,x,uc,j,afisate; ^ cifreord1.cpp: In function 'int main()': cifreord1.cpp:9:16: error: 'x' was not declared in this scope while(fin>>x) ^ cifreord1.cpp:12:13: error: 'fr' was not declared in this scope fr[0]++; ^ cifreord1.cpp:15:13: error: 'uc' was not declared in this scope uc=x%10; ^ cifreord1.cpp:16:13: error: 'fr' was not declared in this scope fr[uc]++; ^ cifreord1.cpp:21:9: error: 'i' was not declared in this scope for(i=9;i>=0;i--) ^ cifreord1.cpp:22:9: error: 'j' was not declared in this scope for(j=1;j<=fr[i];j++) ^ cifreord1.cpp:22:16: error: 'fr' was not declared in this scope for(j=1;j<=fr[i];j++) ^ cifreord1.cpp:24:9: error: 'fout' was not declared in this scope fout<<i<<" "; ^ cifreord1.cpp:25:9: error: 'afisate' was not declared in this scope afisate++; ^ cifreord1.cpp:27:13: error: 'four' was not declared in this scope four<<'\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema CifreOrd1 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ă.