#215
Scrieţi un program care citeşte de la tastatură un număr natural nenul n cu exact 5 cifre şi construieşte un tablou bidimensional completat cu cifrele numărului citit, după o regulă precizată.
Variante Bacalaureat 2009
| Problema | GenMat6 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64885576 | Utilizator | |
| Fișier | genmat6.cpp | Dimensiune | 438 B |
| Data încărcării | 09 Iunie 2026, 14:57 | Scor/rezultat | Eroare de compilare |
genmat6.cpp: In function ‘int main()’: genmat6.cpp:21:25: error: expected ‘)’ before ‘;’ token 21 | cout<< a[i][j]<<' '; | ^ | ) genmat6.cpp:20:21: note: to match this ‘(’ 20 | {for(j=1; j<=6; j++( | ^ genmat6.cpp:21:25: error: expected ‘)’ before ‘;’ token 21 | cout<< a[i][j]<<' '; | ^ | ) genmat6.cpp:20:6: note: to match this ‘(’ 20 | {for(j=1; j<=6; j++( | ^ genmat6.cpp:20:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | {for(j=1; j<=6; j++( | ^~~ genmat6.cpp:22:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 22 | cout<<endl; | ^~~~ genmat6.cpp:25:7: error: expected ‘}’ at end of input 25 | } | ^ genmat6.cpp:4:1: note: to match this ‘{’ 4 | { int n, a[7][7], c[6], i,j; | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat6 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ă.