Обсуждения
Meaning if std::cin and std::cout ?
3 голосов
5 ответов#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 голосов
5 ответовАктуальное сегодня
Audio adding
1 Votes
playground input
0 Votes
What is problem in this code
0 Votes
Software developer
0 Votes
How I can use div
0 Votes
TIPS From Veterans
1 Votes
Html issue
0 Votes