返回列表 發帖
  1. #include<iostream>   
  2. #include<cstdlib>      
  3. using namespace std;   
  4. int main()   
  5. {
  6.     srand(time(NULL));
  7.     re:
  8.                      
  9.     int s=rand()%4+3;
  10.     int z=rand()%13+1;
  11.     cout<<"您所抽到der牌是"<<char(s);
  12.     if(z==1)
  13.     {
  14.            cout<<"A";                          
  15.     }else if(z==11)
  16.     {
  17.      cout<<"J";      
  18.     }else if(z==12)
  19.     {
  20.      cout<<"Q";      
  21.     }else if(z==13)
  22.     {
  23.      cout<<"K";      
  24.     }else
  25.     {
  26.     cout<<z;     
  27.     }
  28.     system("pause");
  29.     system("cls");
  30.     goto re;      
  31.     return 0;            
  32. }
複製代碼

TOP

返回列表