#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 |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57972821 | Utilizator | |
Fișier | genmat6.cpp | Dimensiune | 599 B |
Data încărcării | 06 Mai 2025, 10:13 | Scor / rezultat | Eroare de compilare |
genmat6.cpp:1:10: warning: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wliteral-suffix] #include <iostream>using namespace std; ^ genmat6.cpp:1:20: warning: extra tokens at end of #include directive [enabled by default] #include <iostream>using namespace std; ^ genmat6.cpp: In function 'int main()': genmat6.cpp:5:5: error: 'cin' was not declared in this scope cin>>n; ^ genmat6.cpp:5:5: note: suggested alternative: In file included from genmat6.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ genmat6.cpp:21:13: error: 'cout' was not declared in this scope cout<<a[i][j]<<" "; ^ genmat6.cpp:21:13: note: suggested alternative: In file included from genmat6.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat6.cpp:22:9: error: 'cout' was not declared in this scope cout<<endl; ^ genmat6.cpp:22:9: note: suggested alternative: In file included from genmat6.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat6.cpp:22:15: error: 'endl' was not declared in this scope cout<<endl; ^ genmat6.cpp:22:15: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from genmat6.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^
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ă.