Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- #include <string.h>
- int n = 0;
- char sz[33] = "abcdefghijklmnopqrstuvwxyz";
- char sz1[9] = "zx", // 649
- sz2[9];
- ////////////////////////////////////////////////////////////
- int main() //
- {
- cin >> sz1;
- for(int i = 0; i < 26; i ++)
- for(int i2 = 0; i2 < 26; i2++)
- {
- if(i == i2) continue;
- n++;
- sz2[0] = sz[i ];
- sz2[1] = sz[i2];
- if(strcmp(sz1, sz2) == 0) cout << n << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement