CCCPaste

Slide-9(Guessing with N tries)

#include
int main()
{
    int X,N,n;
    scanf("%d",&X);
    scanf("%d",&N);
    while(N--)
    {
        scanf("%d",&n);
        if(n==X)
        {
            printf("Right, Player-2 wins!");
            break;
        }
        else
        {
            printf("Wrong, %d Choice(s) Left!\n",N);
            if(N==0)
                printf("Player-1 wins!");
        }
    }
    return 0;
}