#include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <stdlib.h> 
using namespace std;

int binary(int decimal)
{
    string str = "";
    int intValue = 0;
    
    for(int i = 8; i >= 0; --i)
    {
        if(decimal >= 0 && decimal >= pow(2, i))
        {
            str += '1';
            decimal -= pow(2, i);
        }
        else
            str += '0';
    } 
    intValue = atoi(str.c_str());
    return intValue;
}

int main()
{
    cout << "Decimal\tBinary\tOctal\tHexadecimal" << endl;
    
    for (int i = 1; i <= 256; ++i)
    {
        cout << i << "\t" << binary(i) << "\t"
                          << oct << i << "\t"
                          << hex << i << endl;
    }
}