#1395
Se dau două matrice cu elemente numere întregi. Calculați suma lor.
| Problema | MSuma | Operații I/O |
msuma.in/msuma.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #62076172 | Utilizator | |
| Fișier | msuma.cpp | Dimensiune | 638 B |
| Data încărcării | 07 Ianuarie 2026, 17:23 | Scor/rezultat | Eroare de compilare |
msuma.cpp: In function 'int main()': msuma.cpp:10:15: error: two or more data types in declaration of 'n' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:10:18: error: two or more data types in declaration of 'm' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:10:21: error: two or more data types in declaration of 'p' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:10:24: error: two or more data types in declaration of 'q' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:10:37: error: two or more data types in declaration of 'a' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:10:50: error: two or more data types in declaration of 'b' float int n, m, p, q, a[101][101], b[101][101]; ^ msuma.cpp:11:10: error: 'n' was not declared in this scope fin>>n>>m; ^ msuma.cpp:11:13: error: 'm' was not declared in this scope fin>>n>>m; ^ msuma.cpp:14:9: error: 'a' was not declared in this scope fin>>a[i][j]; ^ msuma.cpp:15:10: error: 'p' was not declared in this scope fin>>p>>q; ^ msuma.cpp:15:13: error: 'q' was not declared in this scope fin>>p>>q; ^ msuma.cpp:18:15: error: 'b' was not declared in this scope fin>>b[i][j]; ^ msuma.cpp:22:10: error: 'a' was not declared in this scope a[i][j]=a[i][j]+b[i][j]; ^ msuma.cpp:22:26: error: 'b' was not declared in this scope a[i][j]=a[i][j]+b[i][j]; ^ msuma.cpp:25:16: error: 'a' was not declared in this scope fout<<a[i][j]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema MSuma 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ă.