Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- char s[100];
- int a[26];
- cin.getline(s, 100);
- _asm {
- lea esi, a
- mov ecx, 26
- _loop:
- mov dword ptr [esi], 0
- add esi, 4
- loop _loop
- lea esi, s
- xor ecx, ecx
- _loop1:
- cmp byte ptr [esi], 0
- je _end
- mov cl, byte ptr [esi]
- sub cl, 'a'
- inc a[ecx * 4]
- inc esi
- jmp _loop1
- _end:
- }
- for (int i = 0; i < 26; ++i)
- cout << (char)('a' + i) << " " << a[i] << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment