Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a, b, c, d, amount = 1;
- cout << "Print number = ";
- cin >> a >> b >> c >> d;
- if (a == b == c == d) amount *= 4;
- else if (a == b && c == d) amount *= 2;
- else if (a == c && b == d) amount *= 2;
- else if (a == d && c == b) amount *= 2;
- else if (a == b == c) amount *= 3;
- else if (a == b == d) amount *= 3;
- else if (a == c == d) amount *= 3;
- else if (d == b == c) amount *= 3;
- else if (a == b) amount *= 2;
- else if (a == c) amount *= 2;
- else if (a == d) amount *= 2;
- else if (b == c) amount *= 2;
- else if (b == d) amount *= 2;
- else if (c == d) amount *= 2;
- else amount = 0;
- cout << amount;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement