#include <iostream> #include <string> #include <bitset> using namespace std; int main() { string end; int times = 0; int i = 0; while(i < 100){ i++; times += i; bitset<13> valueo(times); bitset<7> valuet(i); cout << valueo << " " << valuet << endl; } cin >> end; return 0; }
Standard input is empty
0000000000001 0000001 0000000000011 0000010 0000000000110 0000011 0000000001010 0000100 0000000001111 0000101 0000000010101 0000110 0000000011100 0000111 0000000100100 0001000 0000000101101 0001001 0000000110111 0001010 0000001000010 0001011 0000001001110 0001100 0000001011011 0001101 0000001101001 0001110 0000001111000 0001111 0000010001000 0010000 0000010011001 0010001 0000010101011 0010010 0000010111110 0010011 0000011010010 0010100 0000011100111 0010101 0000011111101 0010110 0000100010100 0010111 0000100101100 0011000 0000101000101 0011001 0000101011111 0011010 0000101111010 0011011 0000110010110 0011100 0000110110011 0011101 0000111010001 0011110 0000111110000 0011111 0001000010000 0100000 0001000110001 0100001 0001001010011 0100010 0001001110110 0100011 0001010011010 0100100 0001010111111 0100101 0001011100101 0100110 0001100001100 0100111 0001100110100 0101000 0001101011101 0101001 0001110000111 0101010 0001110110010 0101011 0001111011110 0101100 0010000001011 0101101 0010000111001 0101110 0010001101000 0101111 0010010011000 0110000 0010011001001 0110001 0010011111011 0110010 0010100101110 0110011 0010101100010 0110100 0010110010111 0110101 0010111001101 0110110 0011000000100 0110111 0011000111100 0111000 0011001110101 0111001 0011010101111 0111010 0011011101010 0111011 0011100100110 0111100 0011101100011 0111101 0011110100001 0111110 0011111100000 0111111 0100000100000 1000000 0100001100001 1000001 0100010100011 1000010 0100011100110 1000011 0100100101010 1000100 0100101101111 1000101 0100110110101 1000110 0100111111100 1000111 0101001000100 1001000 0101010001101 1001001 0101011010111 1001010 0101100100010 1001011 0101101101110 1001100 0101110111011 1001101 0110000001001 1001110 0110001011000 1001111 0110010101000 1010000 0110011111001 1010001 0110101001011 1010010 0110110011110 1010011 0110111110010 1010100 0111001000111 1010101 0111010011101 1010110 0111011110100 1010111 0111101001100 1011000 0111110100101 1011001 0111111111111 1011010 1000001011010 1011011 1000010110110 1011100 1000100010011 1011101 1000101110001 1011110 1000111010000 1011111 1001000110000 1100000 1001010010001 1100001 1001011110011 1100010 1001101010110 1100011 1001110111010 1100100