#213
GenMat4
Scrieţi un program care citeşte de la tastatură un număr natural nenul n
construieşte un tablou bidimensional de dimensiune n
în care fiecare element este egal cu ultima cifră a produsului indicilor.
Variante Bacalaureat 2009
Problema | GenMat4 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53258430 | Utilizator | |
Fișier | genmat4.cpp | Dimensiune | 610 B |
Data încărcării | 22 Octombrie 2024, 17:37 | Scor / rezultat | Eroare de compilare |
genmat4.cpp: In function 'int main()': genmat4.cpp:14:5: error: 'cin' was not declared in this scope cin>>n; ^ genmat4.cpp:14:5: note: suggested alternative: In file included from genmat4.cpp:9:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ genmat4.cpp:15:9: error: 'i' was not declared in this scope for(i=1;i<=n;i++) ^ genmat4.cpp:17:13: error: 'j' was not declared in this scope for(j=1;j<=n;j++) ^ genmat4.cpp:20:13: error: 'cout' was not declared in this scope cout>>k%10>>' '; ^ genmat4.cpp:20:13: note: suggested alternative: In file included from genmat4.cpp:9:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat4.cpp:22:9: error: 'cout' was not declared in this scope cout<<endl; ^ genmat4.cpp:22:9: note: suggested alternative: In file included from genmat4.cpp:9:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat4.cpp:22:15: error: 'endl' was not declared in this scope cout<<endl; ^ genmat4.cpp:22:15: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from genmat4.cpp:9: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ genmat4.cpp:13:11: warning: unused variable 'm' [-Wunused-variable] int n,m,k; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat4 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ă.