#213
Scrieţi un program care citeşte de la tastatură un număr natural nenul n construieşte un tablou bidimensional de dimensiune n în care fiecare element este egal cu ultima cifră a produsului indicilor.
Variante Bacalaureat 2009
| Problema | GenMat4 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64819141 | Utilizator | |
| Fișier | genmat4.cpp | Dimensiune | 417 B |
| Data încărcării | 03 Iunie 2026, 14:04 | Scor/rezultat | Eroare de compilare |
genmat4.cpp: In function ‘int main()’: genmat4.cpp:12:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 12 | for(int j=1;j<=m;j++) | ^~~ genmat4.cpp:14:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 14 | a[i][j]=p%10; | ^ genmat4.cpp:14:15: error: ‘i’ was not declared in this scope 14 | a[i][j]=p%10; | ^ genmat4.cpp:14:18: error: ‘j’ was not declared in this scope 14 | a[i][j]=p%10; | ^ genmat4.cpp:16:9: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 16 | for(int j=1;j<=m;j++) | ^~~ genmat4.cpp:18:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | cout<<endl;} | ^~~~ genmat4.cpp:6:25: warning: unused variable ‘A’ [-Wunused-variable] 6 | int n,m,a[21][21],p,A[21][21]; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat4 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ă.