Q&A Discussões
#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 Votos
5 RespostasQuente hoje
How to improve code readability
0 Votes
I NEED to make a game
1 Votes
Regarding course
0 Votes
Solved Grouping data
0 Votes
what is python
0 Votes
Android
0 Votes