#781
Zone1
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 | #23158829 | Utilizator | |
Fișier | zone1.cpp | Dimensiune | 1.15 KB |
Data încărcării | 27 Mai 2020, 13:17 | Scor / rezultat | Eroare de compilare |
zone1.cpp: In function 'int main()': zone1.cpp:9:19: warning: statement has no effect [-Wunused-value] v[i][j]; ^ zone1.cpp:16:21: error: incompatible types in assignment of 'int' to 'int [100]' v[0]=s1; ^ zone1.cpp:22:25: error: incompatible types in assignment of 'int' to 'int [100]' v[1]=s2; ^ zone1.cpp:27:29: error: incompatible types in assignment of 'int' to 'int [100]' v[2]=s3; ^ zone1.cpp:32:33: error: incompatible types in assignment of 'int' to 'int [100]' v[3]=s4; ^ zone1.cpp:42:24: error: invalid conversion from 'int*' to 'int' [-fpermissive] aux=v[i]; ^ zone1.cpp:5:22: warning: unused variable 'z' [-Wunused-variable] int v[100][100], z[100], n, i, j, s1=0, s2=0, s3=0, s4=0, c=0, aux=0; ^ zone1.cpp:5:63: warning: unused variable 'c' [-Wunused-variable] int v[100][100], z[100], n, i, j, s1=0, s2=0, s3=0, s4=0, c=0, aux=0; ^
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ă.