Q&A Discussions
How to develop a game
-2 Votes
4 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 AnswersPlz answer?
1 Vote
2 AnswersWher is mistake?
0 Votes
5 AnswersHot today
Fast coding (mobile)
1 Votes
..
1 Votes
Beginner_to_SoloLearn
2 Votes
DSA doubt
1 Votes
Coding help
2 Votes
Bridge pattern use case
0 Votes
Data structure using C
0 Votes
Input errors (python)
1 Votes