#781
Se dă o matrice cu n linii şi n coloane şi elemente numere naturale. Să se afişeze, în ordine crescătoare, sumele elementelor din cele patru zone delimitate de diagonale.
| Problema | Zone1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64879771 | Utilizator | |
| Fișier | zone1.cpp | Dimensiune | 792 B |
| Data încărcării | 09 Iunie 2026, 10:43 | Scor/rezultat | Eroare de compilare |
zone1.cpp: In function ‘int main()’: zone1.cpp:34:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 34 | for(i=1; i<=n; i++) | ^~~ zone1.cpp:41:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 41 | b[1]=s1; b[2]=s2; b[3]=s3; b[4]=s4; | ^ zone1.cpp:48:17: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 48 | for(i=1; i<=4; i++) | ^~~ zone1.cpp:49:33: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 49 | cout<<b[i]<<" "; | ^ zone1.cpp:49:33: error: expected ‘}’ at end of input zone1.cpp:4:1: note: to match this ‘{’ 4 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Zone1 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ă.