#78
Scrieți definiția completă subprogramului C++ citmat care citește de la tastatură dimensiunile și elementele unui tablou bidimensional.
| Problema | FCitireMatrice | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64857726 | Utilizator | |
| Fișier | fcitirematrice.cpp | Dimensiune | 231 B |
| Data încărcării | 07 Iunie 2026, 19:45 | Scor/rezultat | Eroare de compilare |
fcitirematrice.cpp: In function ‘int main()’: fcitirematrice.cpp:9:33: error: ‘n’ has not been declared 9 | void citmat(int a[101][101],n,m,i,j); | ^ fcitirematrice.cpp:9:35: error: ‘m’ has not been declared 9 | void citmat(int a[101][101],n,m,i,j); | ^ fcitirematrice.cpp:9:37: error: ‘i’ has not been declared 9 | void citmat(int a[101][101],n,m,i,j); | ^ fcitirematrice.cpp:9:39: error: ‘j’ has not been declared 9 | void citmat(int a[101][101],n,m,i,j); | ^ fcitirematrice.cpp:10:10: error: ‘n’ was not declared in this scope 10 | cin>>n>>m; | ^ fcitirematrice.cpp:10:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 10 | cin>>n>>m; | ^ | tm fcitirematrice.cpp:11:9: error: ‘i’ was not declared in this scope 11 | for(i=0;i<n;i++) | ^ fcitirematrice.cpp:12:13: error: ‘j’ was not declared in this scope 12 | for(j=0;j<m;j++) | ^ fcitirematrice.cpp:13:18: error: ‘a’ was not declared in this scope 13 | cin>>a[i][j]; | ^ fcitirematrice.cpp: At global scope: fcitirematrice.cpp:20:5: error: redefinition of ‘int main()’ 20 | int main(){ | ^~~~ fcitirematrice.cpp:6:5: note: ‘int main()’ previously defined here 6 | int main() | ^~~~ fcitirematrice.cpp: In function ‘int main()’: fcitirematrice.cpp:22:9: error: ‘citmat’ was not declared in this scope 22 | citmat(a,n,m); | ^~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema FCitireMatrice face parte din a doua categorie. Pentru aceste probleme se folosește un program suport, furnizat de propunătorul problemei. 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ă.