#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 | #54991696 | Utilizator | |
Fișier | zone1.cpp | Dimensiune | 622 B |
Data încărcării | 15 Decembrie 2024, 14:45 | Scor / rezultat | Eroare de compilare |
zone1.cpp:5:1: error: 'intn' does not name a type intn ,a[1001][1001],s1,s2,s3,s4; ^ zone1.cpp: In function 'int main()': zone1.cpp:8:10: error: 'n' was not declared in this scope cin>>n; ^ zone1.cpp:9:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ zone1.cpp:11:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ zone1.cpp:13:18: error: 'a' was not declared in this scope cin>>a[i][j]; ^ zone1.cpp:16:13: error: 's1' was not declared in this scope s1=s1+a[i][j]; ^ zone1.cpp:20:14: error: 's2' was not declared in this scope s2=s2+a[i][j]; ^ zone1.cpp:24:14: error: 's3' was not declared in this scope s3=s3+a[i][j]; ^ zone1.cpp:28:14: error: 's4' was not declared in this scope s4=s4+a[i][j]; ^ zone1.cpp:32:11: error: 's1' was not declared in this scope cout<<s1<<" "<<s2<<" "<<s3<<" "<<s4; ^ zone1.cpp:32:20: error: 's2' was not declared in this scope cout<<s1<<" "<<s2<<" "<<s3<<" "<<s4; ^ zone1.cpp:32:29: error: 's3' was not declared in this scope cout<<s1<<" "<<s2<<" "<<s3<<" "<<s4; ^ zone1.cpp:32:38: error: 's4' was not declared in this scope cout<<s1<<" "<<s2<<" "<<s3<<" "<<s4; ^
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ă.