#2822
GenMat25
Scrieți un program care citește de la tastatură un număr natural, n
(n∈[2,10
2
]
), și construiește în memorie un tablou bidimensional, cu n
linii și n
coloane, astfel:
[1,n]
;n
;Subiect Bacalaureat 2016, sesiunea iunie-iulie
Problema | GenMat25 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #50632270 | Utilizator | |
Fișier | genmat25.cpp | Dimensiune | 500 B |
Data încărcării | 17 Aprilie 2024, 20:07 | Scor / rezultat | Eroare de compilare |
genmat25.cpp:3:17: error: 'st' is not a namespace-name using namespace st; ^ genmat25.cpp:3:19: error: expected namespace-name before ';' token using namespace st; ^ genmat25.cpp: In function 'int main()': genmat25.cpp:10:5: error: 'cin' was not declared in this scope cin >> n; ^ genmat25.cpp:10:5: note: suggested alternative: In file included from genmat25.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ genmat25.cpp:23:13: error: 'cout' was not declared in this scope cout << a[j][i] << " "; ^ genmat25.cpp:23:13: note: suggested alternative: In file included from genmat25.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat25.cpp:24:9: error: 'cout' was not declared in this scope cout <<endl; ^ genmat25.cpp:24:9: note: suggested alternative: In file included from genmat25.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat25.cpp:24:16: error: 'endl' was not declared in this scope cout <<endl; ^ genmat25.cpp:24:16: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from genmat25.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ genmat25.cpp:25:5: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat25 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ă.