#4042
b16_rec
Se citeste un număr natural n
în baza 10
. Să se transforme acest număr în baza 16
, folosind un subprogram recursiv.
Problema | b16_rec | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54754010 | Utilizator | |
Fișier | b16_rec.cpp | Dimensiune | 264 B |
Data încărcării | 07 Decembrie 2024, 14:30 | Scor / rezultat | Eroare de compilare |
In file included from /usr/include/c++/4.8/iostream:38:0, from b16_rec.cpp:3: /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h: In function 'void schimBaza(long long int)': /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:184:1: error: 'namespace' definition is not allowed here namespace std ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/memoryfwd.h:50:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected '=' before '__attribute__' namespace std _GLIBCXX_VISIBILITY(default) ^ /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected identifier before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected primary-expression before '__attribute__' /usr/include/c++/4.8/bits/stringfwd.h:42:15: error: expected ';' before '__attribute__' In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from b16_rec.cpp:3: /usr/include/wchar.h:132:1: error: expected unqualified-id before string constant __BEGIN_DECLS ^ In file included from /usr/include/c++/4.8/ios:39:0, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from b16_rec.cpp:3: /usr/include/c++/4.8/exception:35:37: error: expected '}' before end of line #pragma GCC visibility push(default) ^ /usr/include/c++/4.8/exception: At global scope: /usr/include/c++/4.8/exception:35:37: error: expected declaration before end of line
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema b16_rec 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ă.