Обсуждения
std::string
1 голос
3 ответовConvering char to std::string
3 голосов
7 ответовchar* vs std::string
0 голосов
1 ответ#include <iostream>
#include <bitset>
int main()
{
int myDecimalNumber;
std::cin >> myDecimalNumber;
std::string binary = std::bitset<8>(myDecimalNumber).to_string(); //to binary
std::cout<<binary<<"\n";
unsigned long decimal = std::bitset<8>(binary).to_long();
std::cout<<decimal<<"\n";
return 0;
}
2 голосов
5 ответовАктуальное сегодня
Activities on sololearn
4 Votes
playground input
1 Votes
Html issue
2 Votes
Can you help me ?
1 Votes
How I can use div
1 Votes
TIPS From Veterans
1 Votes
Playground input
1 Votes
App development 🔥☝️
1 Votes
Computer architecture
1 Votes