Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int p[128] = {20, 20, 80, 140, 140, 160, 160, 160, 180, 180, 180, 180, 180, 180, 160, 160, 140, 80, 40, 0, 0, 0, 0, 0, 0, 20, 60, 60, 120, 120, 140, 120, 140, 120, 120, 120, 120, 80, 80, 100, 80, 60, 80, 80, 120, 120, 100, 80, 80, 80, 100, 100, 80, 80, 120, 80, 60, 60, 40, 20, 20, 20, 40, 120, 180, 200, 220, 220, 220, 220, 220, 240, 240, 220, 220, 220, 220, 200, 200, 180, 200, 200, 200, 200, 200, 220, 200, 200, 160, 160, 120, 80, 0, 0, 0, 0, 0, 20, 80, 100, 60, 60, 20, 0, 0, 0, 0, 0, 0, 40, 40, 40, 60, 80, 80, 80, 80, 80, 120, 100, 100, 80, 100, 100, 80, 120, 60, 80};
- for (int i = 0; i < 128; ++i) {
- if ( p[i] == 240 )
- cout << "00000";
- if ( p[i] == 140 )
- cout << "00001";
- if (p[i] == 40)
- cout << "0001";
- if (p[i] == 160)
- cout << "0010";
- if (p[i] == 20)
- cout << "0011";
- if (p[i] == 180)
- cout << "0100";
- if (p[i] == 60)
- cout << "0101";
- if (p[i] == 100)
- cout << "0110";
- if (p[i] == 200)
- cout << "0111";
- if (p[i] == 220)
- cout << "100";
- if (p[i] == 120)
- cout << "101";
- if (p[i] == 0)
- cout << "110";
- if (p[i] == 80)
- cout << "111";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement