#1393
DesenRomb
Se citește un număr natural n
cu o cifră. Afișați pe ecran o figură sub forma de romb formata cu numerele naturale de la 1
la n
, ca în exemplu.
Problema | DesenRomb | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51621239 | Utilizator | |
Fișier | desenromb.cpp | Dimensiune | 462 B |
Data încărcării | 23 Iulie 2024, 02:22 | Scor / rezultat | Eroare de compilare |
desenromb.cpp:1:19: error: missing terminating > character #include <iostream ^ desenromb.cpp:2:1: error: expected unqualified-id before '>' token > ^ desenromb.cpp: In function 'int main()': desenromb.cpp:5:12: error: 'cin' was not declared in this scope int n; cin >> n; ^ desenromb.cpp:5:12: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ desenromb.cpp:7:45: error: 'cout' was not declared in this scope for (int i2 = 1; i2 <= n - i; i2++) cout << " "; ^ desenromb.cpp:7:45: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ desenromb.cpp:8:49: error: 'cout' was not declared in this scope for (int i2 = 1; i2 <= 2 * i - 1; i2++) cout << i; ^ desenromb.cpp:8:49: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ desenromb.cpp:9:9: error: 'cout' was not declared in this scope cout << '\n'; ^ desenromb.cpp:9:9: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ desenromb.cpp:11:41: error: 'cout' was not declared in this scope for (int i2 = 1; i2 <= i; i2++) cout << " "; ^ desenromb.cpp:11:41: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ desenromb.cpp:12:55: error: 'cout' was not declared in this scope for (int i2 = 1; i2 <= 2 * (n - i) - 1; i2++) cout << n - i; ^ desenromb.cpp:12:55: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ desenromb.cpp:13:9: error: 'cout' was not declared in this scope cout << '\n'; ^ desenromb.cpp:13:9: note: suggested alternative: In file included from desenromb.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DesenRomb 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ă.