Advertisement
Guest User

Untitled

a guest
Sep 21st, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int a, b, c, d, amount = 1;
  7. cout << "Print number = ";
  8. cin >> a >> b >> c >> d;
  9. if (a == b == c == d) amount *= 4;
  10. else if (a == b && c == d) amount *= 2;
  11. else if (a == c && b == d) amount *= 2;
  12. else if (a == d && c == b) amount *= 2;
  13. else if (a == b == c) amount *= 3;
  14. else if (a == b == d) amount *= 3;
  15. else if (a == c == d) amount *= 3;
  16. else if (d == b == c) amount *= 3;
  17. else if (a == b) amount *= 2;
  18. else if (a == c) amount *= 2;
  19. else if (a == d) amount *= 2;
  20. else if (b == c) amount *= 2;
  21. else if (b == d) amount *= 2;
  22. else if (c == d) amount *= 2;
  23. else amount = 0;
  24. cout << amount;
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement