#include #include int main(){ int x, y, r, i, j, n=1, c=2; int a[9]; int b[52]; srand(time(NULL)); for(i=0;i<52;i++) b[i]=0; for(i=0;i<9;i++){ do{ r=rand()%52; a[i]=r; }while(b[r]==1); b[r]=1; } do{ for(i=0;i0;j--) printf("x,"); printf("\n"); do{ printf("Will the next drawn number be bigger (1) than or smaller (0) than this one? "); scanf("%d",&x); }while(x<0||x>1); if(x==1&&a[i]>25){ printf("You are right.\n"); c=1; } else if(x==0&&a[i]<26){ printf("You are right.\n"); c=1; } else if(x==1&&a[i]<26){ printf("You are wrong.\n"); c=0; } else if(x=0&&a[i]>25){ printf("You are wrong.\n"); c=0; } n++; }while(c==2||c==1); for(i=0;i0;j--) printf("x,"); printf("\n"); if(c==1) printf("You win.\n"); else printf("You lose the game.\n"); return 0; }