#234
Se dă o matrice cu elemente numere întregi. Să se determine media aritmetică a elementelor strict pozitive din matrice, care sunt situate sub diagonala principală.
Variante Bacalaureat 2009
| Problema | MedPoz | Operații I/O |
medpoz.in/medpoz.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64640089 | Utilizator | |
| Fișier | medpoz.cpp | Dimensiune | 432 B |
| Data încărcării | 19 Mai 2026, 21:44 | Scor/rezultat | Eroare de compilare |
medpoz.cpp:5:16: warning: missing terminating " character 5 | ofstream fout("medpoz.out); | ^ medpoz.cpp:5:16: error: missing terminating " character 5 | ofstream fout("medpoz.out); | ^~~~~~~~~~~~~ medpoz.cpp:6:12: error: expected ‘)’ before ‘{’ token 6 | int main() | ^ | ) 7 | {int n, i, j, a[21][21], s=0, k=0, m=1; | ~ medpoz.cpp:5:15: note: to match this ‘(’ 5 | ofstream fout("medpoz.out); | ^ medpoz.cpp: In function ‘std::ofstream fout(int (*)())’: medpoz.cpp:17:4: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 17 | if(k>0) | ^~ medpoz.cpp:19:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 19 | cout<<m; | ^~~~ medpoz.cpp:20:5: error: ‘else’ without a previous ‘if’ 20 | } else | ^~~~ medpoz.cpp:22:8: error: could not convert ‘0’ from ‘int’ to ‘std::ofstream’ {aka ‘std::basic_ofstream<char>’} 22 | return 0;} | ^ | | | int
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MedPoz 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ă.