Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int pixels[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};
- int alphabet[256];
- for (int i = 0; i < 256; ++i) {
- alphabet[i] = 0;
- }
- for (int i = 0; i < 128; ++i) {
- alphabet[ pixels[i] ]++;
- }
- for (int i = 0; i < 256; ++i) {
- if (alphabet[i] != 0) {
- cout << i << " - " << alphabet[i] << "\n";
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement