#351
Piramida
Se citește numărul natural n
. Să se afișeze următoarea piramidă de numere:
1 1 2 1 2 3 ....... 1 2 3 ... n
Problema | Piramida | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54678347 | Utilizator | |
Fișier | piramida.cpp | Dimensiune | 231 B |
Data încărcării | 05 Decembrie 2024, 10:49 | Scor / rezultat | Eroare de compilare |
piramida.cpp:3:1: error: 'usin' does not name a type usin namespace std; ^ piramida.cpp: In function 'int main()': piramida.cpp:7:5: error: 'cin' was not declared in this scope cin >> n; ^ piramida.cpp:7:5: note: suggested alternative: In file included from piramida.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ piramida.cpp:10:13: error: 'cout' was not declared in this scope cout << j << ' '; ^ piramida.cpp:10:13: note: suggested alternative: In file included from piramida.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ piramida.cpp:11:10: error: 'cout' was not declared in this scope cout << endl; ^ piramida.cpp:11:10: note: suggested alternative: In file included from piramida.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ piramida.cpp:11:18: error: 'endl' was not declared in this scope cout << endl; ^ piramida.cpp:11:18: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from piramida.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ piramida.cpp:14:1: error: expected ';' before '}' token } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Piramida 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ă.