#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 | #64908588 | Utilizator | |
| Fișier | genmat6.cpp | Dimensiune | 330 B |
| Data încărcării | 11 Iunie 2026, 16:58 | Scor/rezultat | Eroare de compilare |
genmat6.cpp:4:1: error: expected initializer before ‘int’ 4 | int n,i,j,a[7][7],s; | ^~~ genmat6.cpp:5:1: error: ‘cin’ does not name a type 5 | cin>>n; | ^~~ genmat6.cpp:6:1: error: expected unqualified-id before ‘for’ 6 | for(i=1; i<=6; i++) | ^~~ genmat6.cpp:6:10: error: ‘i’ does not name a type 6 | for(i=1; i<=6; i++) | ^ genmat6.cpp:6:16: error: ‘i’ does not name a type 6 | for(i=1; i<=6; i++) | ^ genmat6.cpp:8:1: error: expected unqualified-id before ‘for’ 8 | for(i=1; i<=6; i++) { | ^~~ genmat6.cpp:8:10: error: ‘i’ does not name a type 8 | for(i=1; i<=6; i++) { | ^ genmat6.cpp:8:16: error: ‘i’ does not name a type 8 | for(i=1; i<=6; i++) { | ^ genmat6.cpp:15:1: error: expected unqualified-id before ‘for’ 15 | for(i=1; i<=6; i++K | ^~~ genmat6.cpp:15:10: error: ‘i’ does not name a type 15 | for(i=1; i<=6; i++K | ^ genmat6.cpp:15:16: error: ‘i’ does not name a type 15 | for(i=1; i<=6; i++K | ^ genmat6.cpp:16:18: error: ‘j’ does not name a type 16 | for(j=1; j<=6; j++K | ^ genmat6.cpp:16:24: error: ‘j’ does not name a type 16 | for(j=1; j<=6; j++K | ^ genmat6.cpp:18:1: error: expected declaration before ‘}’ token 18 | } | ^ genmat6.cpp:19:9: error: ‘cout’ does not name a type 19 | cout<<endl; | ^~~~ genmat6.cpp:20:1: error: expected declaration before ‘}’ token 20 | } | ^ genmat6.cpp:21:1: error: expected unqualified-id before ‘return’ 21 | return 0; | ^~~~~~ genmat6.cpp:22:1: error: expected declaration before ‘}’ token 22 | } | ^
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ă.