#include <stdio.h>
void Hold_Cards(int *CountA,int *CountB)
{
int i=0;
int get_cards=0;
printf("Start Hold Cards==============>>\n");
printf("\nCompter Hold Cards:");
scanf("%d",&CountA[i]);
while(CountA[0]>=4||CountA[0]<1)
{
printf("\nComputer Hold Cards:");
scanf("%d",&CountA[0]);
}
get_cards+=CountA[0];
printf("Left %d cards!\n",54-get_cards);
do
{
printf("\nPeople Hold Cards:");
scanf("%d",&CountB[i]);
while(CountB[i]>4||CountB[i]<1)
{
printf("\nPeople Hold Cards:");
scanf("%d",&CountB[i]);
}
get_cards+=CountB[i];
i++;
CountA[i]=5-CountB[i-1];
get_cards+=CountA[i];
printf("Compter Hold Cards:%d\n",CountA[i]);
printf("Left %d cards!\n",54-get_cards);
}while(54-get_cards>=4);
}
int main()
{
int CountA[15];
int CountB[15];
Hold_Cards(CountA,CountB);
printf("Compter Win!");
return 0;
}