#234
MedPoz
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 | #35868693 | Utilizator | |
Fișier | medpoz.cpp | Dimensiune | 703 B |
Data încărcării | 25 Martie 2022, 10:23 | Scor / rezultat | Eroare de compilare |
medpoz.cpp: In function 'int main()': medpoz.cpp:7:12: error: 'n' was not declared in this scope fin >> n; ^ medpoz.cpp:10:16: error: 'a' was not declared in this scope fin >> a[i][j]; ^ medpoz.cpp:14:25: error: 'a' was not declared in this scope if(i > j && a[i][j] > 0) ^ medpoz.cpp:16:17: error: 's' was not declared in this scope s += a[i][j]; ^ medpoz.cpp:17:17: error: 'cnt' was not declared in this scope cnt++; ^ medpoz.cpp:18:17: error: 'ok' was not declared in this scope ok = 1; ^ medpoz.cpp:21:8: error: 'ok' was not declared in this scope if(ok!=0) ^ medpoz.cpp:23:30: error: 's' was not declared in this scope double x = trunc((double)s/cnt*1000)/1000.0; ^ medpoz.cpp:23:32: error: 'cnt' was not declared in this scope double x = trunc((double)s/cnt*1000)/1000.0; ^
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ă.