#4689
Scrieţi un program care citeşte de la tastatură un număr natural n
şi construieşte în memorie o matrice cu n
linii şi n
coloane în care:
[1, n]
;[1, n]
;Problema | GenMat31 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58411232 | Utilizator | |
Fișier | genmat31.cpp | Dimensiune | 334 B |
Data încărcării | 02 Iunie 2025, 17:49 | Scor / rezultat | Eroare de compilare |
genmat31.cpp:2:7: error: expected nested-name-specifier before 'nameslace' using nameslace sgd; ^ genmat31.cpp:2:7: error: 'nameslace' has not been declared genmat31.cpp:2:17: error: expected ';' before 'sgd' using nameslace sgd; ^ genmat31.cpp:2:17: error: 'sgd' does not name a type genmat31.cpp: In function 'int main()': genmat31.cpp:5:2: error: 'cin' was not declared in this scope cin>>n; ^ genmat31.cpp:5:2: note: suggested alternative: In file included from genmat31.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ genmat31.cpp:15:6: error: 'cout' was not declared in this scope cout<<M[i][j]<<' '; ^ genmat31.cpp:15:6: note: suggested alternative: In file included from genmat31.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat31.cpp:15:12: error: 'M' was not declared in this scope cout<<M[i][j]<<' '; ^ genmat31.cpp:16:3: error: 'cout' was not declared in this scope cout<<endl;} ^ genmat31.cpp:16:3: note: suggested alternative: In file included from genmat31.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat31.cpp:16:9: error: 'endl' was not declared in this scope cout<<endl;} ^ genmat31.cpp:16:9: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from genmat31.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 GenMat31 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ă.