Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- char x, y, z;
- cin >> x >> y >> z;
- int counter = 0;
- for (int i = x; i <= y; i++) {
- for (int k = x; k <= y; k++) {
- for (int j = x; j <= y; j++) {
- if (i != z && k != z && j != z) {
- cout << (char)i << (char)k << (char)j << " ";
- counter++;
- }
- }
- }
- }
- cout << counter << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement