#131
SortCif2
Să se scrie un program care ordonează elementele unui vector crescător după prima cifră.
Problema | SortCif2 | Operații I/O |
sortcif2.in /sortcif2.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #43806021 | Utilizator | |
Fișier | sortcif2.cpp | Dimensiune | 387 B |
Data încărcării | 17 Mai 2023, 09:47 | Scor / rezultat | Eroare de compilare |
sortcif2.cpp:5:1: error: expected ',' or ';' before 'ofstream' ofstream fout ("sortcif2.out") ^ sortcif2.cpp: In function 'int main()': sortcif2.cpp:8:8: error: 'n' was not declared in this scope {fin>> n; ^ sortcif2.cpp:9:6: error: 'i' was not declared in this scope for (i=1;i<=n;i++) ^ sortcif2.cpp:10:10: error: 'v' was not declared in this scope fin>>v[i]; ^ sortcif2.cpp:14:5: error: 'uc' was not declared in this scope uc=n%10; ^ sortcif2.cpp:15:5: error: 'ogl' was not declared in this scope ogl=ogl*10+uc; ^ sortcif2.cpp:17:3: error: 'pc' was not declared in this scope } pc=ogl%10; ^ sortcif2.cpp:17:6: error: 'ogl' was not declared in this scope } pc=ogl%10; ^ sortcif2.cpp:18:8: error: 'maxi' was not declared in this scope if (pc>maxi) ^ sortcif2.cpp:20:10: error: 'v' was not declared in this scope sort(v[i],v[i+1]); ^ sortcif2.cpp:20:12: error: 'i' was not declared in this scope sort(v[i],v[i+1]); ^ sortcif2.cpp:20:21: error: 'sort' was not declared in this scope sort(v[i],v[i+1]); ^ sortcif2.cpp:21:3: error: 'fout' was not declared in this scope } fout<<v[i]<< " "; ^ sortcif2.cpp:21:9: error: 'v' was not declared in this scope } fout<<v[i]<< " "; ^ sortcif2.cpp:21:11: error: 'i' was not declared in this scope } fout<<v[i]<< " "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema SortCif2 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ă.