Q&A Discussions
#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 AnswersHot today
Gimme some advice
0 Votes
Doubt in C
1 Votes
Php?
0 Votes
how to create my own html page
0 Votes
Modal dialog to modeless dialog
0 Votes
who can do this
0 Votes