Discussions Q&R
#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 Votes
5 RéponsesAujourd'hui en vedette
Kernel in Jupyter
2 Votes
SQL
2 Votes
JAVA PROGRAMMING
1 Votes
What Does Pseudo Elements Mean.
2 Votes
IMAGE
0 Votes