#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 | #64598198 | Utilizator | |
| Fișier | genmat6.cpp | Dimensiune | 837 B |
| Data încărcării | 17 Mai 2026, 22:21 | Scor/rezultat | Eroare de compilare |
genmat6.cpp:15:7: error: stray ‘#’ in program 15 | { #include <iostream> | ^ genmat6.cpp: In function ‘int main()’: genmat6.cpp:15:8: error: ‘include’ was not declared in this scope 15 | { #include <iostream> | ^~~~~~~ genmat6.cpp:15:25: error: expected primary-expression before ‘>’ token 15 | { #include <iostream> | ^ genmat6.cpp:17:1: error: expected primary-expression before ‘using’ 17 | using namespace std; | ^~~~~ genmat6.cpp:19:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 19 | int main() | ^~ genmat6.cpp:19:9: note: remove parentheses to default-initialize a variable 19 | int main() | ^~ | -- genmat6.cpp:19:9: note: or replace parentheses with braces to value-initialize a variable genmat6.cpp:20:1: error: a function-definition is not allowed here before ‘{’ token 20 | { | ^ genmat6.cpp:50:2: error: expected ‘}’ at end of input 50 | } | ^ genmat6.cpp:15:5: note: to match this ‘{’ 15 | { #include <iostream> | ^ genmat6.cpp:18:5: warning: unused variable ‘a’ [-Wunused-variable] 18 | int a[7][7],i,j,cn,cif; | ^ genmat6.cpp:18:13: warning: unused variable ‘i’ [-Wunused-variable] 18 | int a[7][7],i,j,cn,cif; | ^ genmat6.cpp:18:15: warning: unused variable ‘j’ [-Wunused-variable] 18 | int a[7][7],i,j,cn,cif; | ^ genmat6.cpp:18:17: warning: unused variable ‘cn’ [-Wunused-variable] 18 | int a[7][7],i,j,cn,cif; | ^~ genmat6.cpp:18:20: warning: unused variable ‘cif’ [-Wunused-variable] 18 | int a[7][7],i,j,cn,cif; | ^~~ genmat6.cpp:50:2: error: expected ‘}’ at end of input 50 | } | ^ genmat6.cpp:8:1: note: to match this ‘{’ 8 | { | ^
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ă.