#458
Patrat1
Se citește numărul natural impar n
, şi două caractere c
şi d
. Să se afișeze următorul pătrat, format din n
linii şi n
coloane, în care cele două caractere alternează:
cdc...dc dcd...cd .... dcd...cd cdc...dc
Problema | Patrat1 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54669753 | Utilizator | |
Fișier | patrat1.cpp | Dimensiune | 524 B |
Data încărcării | 05 Decembrie 2024, 08:42 | Scor / rezultat | Eroare de compilare |
patrat1.cpp:3:17: error: 'sdt' is not a namespace-name using namespace sdt; ^ patrat1.cpp:3:20: error: expected namespace-name before ';' token using namespace sdt; ^ patrat1.cpp: In function 'int main()': patrat1.cpp:9:5: error: 'cin' was not declared in this scope cin>>n>>a>>b; ^ patrat1.cpp:9:5: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ patrat1.cpp:14:21: error: 'cout' was not declared in this scope if(m%2==1) cout<<a; ^ patrat1.cpp:14:21: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patrat1.cpp:15:19: error: 'cout' was not declared in this scope else cout<<b; ^ patrat1.cpp:15:19: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patrat1.cpp:22:21: error: 'cout' was not declared in this scope cout<<b; ^ patrat1.cpp:22:21: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patrat1.cpp:24:21: error: 'cout' was not declared in this scope cout<<a; ^ patrat1.cpp:24:21: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patrat1.cpp:27:9: error: 'cout' was not declared in this scope cout<<endl; ^ patrat1.cpp:27:9: note: suggested alternative: In file included from patrat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ patrat1.cpp:27:15: error: 'endl' was not declared in this scope cout<<endl; ^ patrat1.cpp:27:15: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from patrat1.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 Patrat1 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ă.