#include #include #define N 5 using namespace std; int uniq(int a[]) { int i, b = a[0], c = 1, d = 0; for (i=1; i= 2) c += 30; d = 0; } else { d++; } } return c; } int main(){ int i, a[N], b; for (i=0; i> a[i]; sort(a, a+N); b = uniq(a); switch (N-b) { case -27: puts("FULL HOUSE"); break; case -28: puts("THREE CARD"); break; case 2: puts("TWO PAIR"); break; case 1: puts("ONE PAIR"); break; default: puts("NO HAND"); break; } return 0; }