#include<time.h>
char* card (int n)
{
static char num[] = {0,0};
switch(n){
case 1: return "A";
case 10: return "10";
case 11: return "J";
case 12: return "Q";
case 13: return "K";
default: num[0] = n+Ɔ'
}
return num;
}
int main(void)
{
int me ,pc;
srand(time(0));
while (1){
printf("您的牌= %s", card (me=rand()%13+1));
printf (" 电脑牌=%s\n", card (pc=rand()%13+1));
if (me>pc)
printf("★You Win★╭∩╮_(︶︿︶)_╭∩╮\n");
else
printf("◆You Lose◆╮(╯▽╰)╭\n");
getchar();}
system("PAUSE");
return 0;
}