Q&A Discussions
What is hexadecimal
3 Votes
2 AnswersOctal system
2 Votes
1 AnswerparseInt() method
1 Vote
2 AnswersPI to more than 15 digits
0 Votes
6 Answerswhy is it <=36?
1 Vote
2 Answers#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
Someone can help me
2 Votes
What's wrong with this?
2 Votes
HTML community, HELP!!
1 Votes
X velocity
0 Votes
I am a super beginner
0 Votes
Files not linking in C++
0 Votes
Web Dev
0 Votes
How this program executes?
0 Votes