返回列表 發帖
  1. #include<iostream>
  2. #include<cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     int a,b;
  7.     srand(time(NULL));
  8.     re:
  9.     a=rand()%4+3;
  10.     b=rand()%13+1;
  11.     if(a==1)
  12.     cout<<char(a)<<"A"<<endl;
  13.     if(a>1 && a<11)
  14.     cout<<char(a)<<b<<endl;
  15.     if(a==11)
  16.     cout<<char(a)<<"J"<<endl;
  17.     if(a==12)
  18.     cout<<char(a)<<"Q"<<endl;
  19.     if(a==13)
  20.     cout<<char(a)<<"K"<<endl;
  21.     system("pause");
  22.     goto re;
  23.     system("pause");
  24.     return 0;   
  25. }
複製代碼

TOP

返回列表