#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 | #64857595 | Utilizator | |
| Fișier | fcitirematrice.cpp | Dimensiune | 220 B |
| Data încărcării | 07 Iunie 2026, 19:34 | Scor/rezultat | Eroare de compilare |
fcitirematrice.cpp: In function ‘int main()’: fcitirematrice.cpp:11:19: warning: for increment expression has no effect [-Wunused-value] 11 | for(j=0;;j<m;j++){ | ~^~ fcitirematrice.cpp:11:21: error: expected ‘)’ before ‘;’ token 11 | for(j=0;;j<m;j++){ | ~ ^ | ) fcitirematrice.cpp:11:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | for(j=0;;j<m;j++){ | ^~~ fcitirematrice.cpp:11:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 11 | for(j=0;;j<m;j++){ | ^ fcitirematrice.cpp:11:25: error: expected ‘;’ before ‘)’ token 11 | for(j=0;;j<m;j++){ | ^ | ; fcitirematrice.cpp:8:9: warning: unused variable ‘a’ [-Wunused-variable] 8 | int a[100][100],n,m,i,j; | ^ fcitirematrice.cpp: At global scope: fcitirematrice.cpp:19:5: error: redefinition of ‘int main()’ 19 | int main(){ | ^~~~ fcitirematrice.cpp:6:5: note: ‘int main()’ previously defined here 6 | int main() | ^~~~ fcitirematrice.cpp: In function ‘int main()’: fcitirematrice.cpp:21:9: error: ‘citmat’ was not declared in this scope 21 | 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ă.