New course! Every coder should learn Generative AI!
Try a free lessonQ&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
Coding
2 Votes
HTML
1 Votes
how to create a website
1 Votes
How to change the font
0 Votes
Pygame
1 Votes
Related to Tuple and list
1 Votes
Plz help me to learn coding
0 Votes