#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 | #64946927 | Utilizator | |
| Fișier | genmat6.cpp | Dimensiune | 333 B |
| Data încărcării | 20 Iunie 2026, 15:27 | Scor/rezultat | 100 puncte |
genmat6.cpp: In function ‘int main()’: genmat6.cpp:8:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 8 | {for(j=q;j<=6;j++) | ^~~ genmat6.cpp:9:16: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 9 | v[i][j]=n2%10; n2=n2/10; q++;} q=2; | ^~ genmat6.cpp:11:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 11 | {for(i=q;i<=6;i++) | ^~~ genmat6.cpp:12:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 12 | v[i][j]=n%10; n=n/10; q++;} | ^ genmat6.cpp:14:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 14 | {for(j=1;j<=6;j++) | ^~~ genmat6.cpp:15:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 15 | cout<<v[i][j]<<" "; cout<<endl;} | ^~~~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.001 secunde | OK. | 20 | 20 | Exemplu | |
| 2 | 0.001 secunde | OK. | 20 | 20 | ||
| 3 | 0.001 secunde | OK. | 20 | 20 | ||
| 4 | 0.002 secunde | OK. | 20 | 20 | ||
| 5 | 0.002 secunde | OK. | 20 | 20 | ||
| Punctaj total | 100 | |||||
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ă.