Sesiones de PyR
std::string
 1 Voto
 3 Respuestaschar* vs std::string
 0 Votos
 1 Respuesta#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 Votos
 5 RespuestasEn tendencia hoy
How create a new language ?
 1 Votes
Beginner question
 0 Votes
I need help to solve this
 0 Votes
Project
 0 Votes