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
I can't see my activity
2 Votes
Hearts refill
2 Votes
Does skipping void Certificate?
2 Votes
Can anyone help me?
1 Votes
Python
3 Votes
Sololearn issue
1 Votes
Random freelancer question
0 Votes