#991
Matrice5
Se dă o matrice pătratică cu n
linii și n
coloane, numerotate de la 1
la n
și elemente numere naturale. Să se determine suma elementelor aflate strict deasupra diagonalei secundare a matricei.
Se va defini și folosi subprogramul sub
, cu 3
parametri:
n
– dimensiunea matriceix
– matriceak
– un număr natural, 1 < k ≤ 2*n
care va returna suma tuturor elementelor a
ij
din matrice pentru care i + j = k
.
Problema | Matrice5 | Operații I/O |
matrice5.in /matrice5.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #16695271 | Utilizator | |
Fișier | matrice5.cpp | Dimensiune | 526 B |
Data încărcării | 16 Septembrie 2019, 21:31 | Scor / rezultat | Eroare de compilare |
matrice5.cpp:3:2: error: stray '\302' in program ^ matrice5.cpp:3:2: error: stray '\240' in program matrice5.cpp:7:2: error: stray '\302' in program ^ matrice5.cpp:7:2: error: stray '\240' in program matrice5.cpp:13:2: error: stray '\302' in program ^ matrice5.cpp:13:2: error: stray '\240' in program matrice5.cpp:19:2: error: stray '\302' in program int n, a[105][105], suma = 0; ^ matrice5.cpp:19:2: error: stray '\240' in program matrice5.cpp:19:2: error: stray '\302' in program matrice5.cpp:19:2: error: stray '\240' in program matrice5.cpp:21:2: error: stray '\302' in program f >> n; ^ matrice5.cpp:21:2: error: stray '\240' in program matrice5.cpp:21:2: error: stray '\302' in program matrice5.cpp:21:2: error: stray '\240' in program matrice5.cpp:23:2: error: stray '\302' in program for(int i = 1; i <= n; ++i) ^ matrice5.cpp:23:2: error: stray '\240' in program matrice5.cpp:23:2: error: stray '\302' in program matrice5.cpp:23:2: error: stray '\240' in program matrice5.cpp:25:2: error: stray '\302' in program for(int j = 1; j <= n; ++j) ^ matrice5.cpp:25:2: error: stray '\240' in program matrice5.cpp:25:2: error: stray '\302' in program matrice5.cpp:25:2: error: stray '\240' in program matrice5.cpp:25:2: error: stray '\302' in program matrice5.cpp:25:2: error: stray '\240' in program matrice5.cpp:25:2: error: stray '\302' in program matrice5.cpp:25:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program f >> a[i][j]; ^ matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:27:2: error: stray '\302' in program matrice5.cpp:27:2: error: stray '\240' in program matrice5.cpp:29:2: error: stray '\302' in program ^ matrice5.cpp:29:2: error: stray '\240' in program matrice5.cpp:29:2: error: stray '\302' in program matrice5.cpp:29:2: error: stray '\240' in program matrice5.cpp:31:2: error: stray '\302' in program for(int i = 1; i <= n; ++i) ^ matrice5.cpp:31:2: error: stray '\240' in program matrice5.cpp:31:2: error: stray '\302' in program matrice5.cpp:31:2: error: stray '\240' in program matrice5.cpp:33:2: error: stray '\302' in program for(int j = 1; j <= n - i; ++j) ^ matrice5.cpp:33:2: error: stray '\240' in program matrice5.cpp:33:2: error: stray '\302' in program matrice5.cpp:33:2: error: stray '\240' in program matrice5.cpp:33:2: error: stray '\302' in program matrice5.cpp:33:2: error: stray '\240' in program matrice5.cpp:33:2: error: stray '\302' in program matrice5.cpp:33:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program suma += a[i][j]; ^ matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:35:2: error: stray '\302' in program matrice5.cpp:35:2: error: stray '\240' in program matrice5.cpp:37:2: error: stray '\302' in program ^ matrice5.cpp:37:2: error: stray '\240' in program matrice5.cpp:37:2: error: stray '\302' in program matrice5.cpp:37:2: error: stray '\240' in program matrice5.cpp:37:2: error: stray '\302' in program matrice5.cpp:37:2: error: stray '\240' in program matrice5.cpp:37:2: error: stray '\302' in program matrice5.cpp:37:2: error: stray '\240' in program matrice5.cpp:39:2: error: stray '\302' in program g << suma; ^ matrice5.cpp:39:2: error: stray '\240' in program matrice5.cpp:39:2: error: stray '\302' in program matrice5.cpp:39:2: error: stray '\240' in program matrice5.cpp:41:2: error: stray '\302' in program ^ matrice5.cpp:41:2: error: stray '\240' in program matrice5.cpp:41:2: error: stray '\302' in program matrice5.cpp:41:2: error: stray '\240' in program matrice5.cpp:41:2: error: stray '\302' in program matrice5.cpp:41:2: error: stray '\240' in program matrice5.cpp:41:2: error: stray '\302' in program matrice5.cpp:41:2: error: stray '\240' in program matrice5.cpp:43:2: error: stray '\302' in program return 0; ^ matrice5.cpp:43:2: error: stray '\240' in program matrice5.cpp:43:2: error: stray '\302' in program matrice5.cpp:43:2: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Matrice5 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ă.