返回列表 發帖
  1. #include <iostream>
  2. #include <cstdlib>
  3. using namespace std;
  4. int main()
  5. {
  6.     re:
  7.     int a;      
  8.     system("cls");
  9.     string name[5]={"MAD","nightcore","動漫OP","VK克","蘇打綠"};
  10.     int ball;
  11.     srand(time(NULL));
  12.     cout<<"要聽哪首歌"<<endl;     
  13.     system("pause");
  14.     system("cls");
  15.     for(int i=0;i<=100;i++)
  16.     {
  17.             ball=rand()%5;
  18.             if(i%2==0)
  19.               cout<<"dsa抽取中asd"<<endl;
  20.             else
  21.               cout<<"asd抽取中dsa"<<endl;
  22.               cout<<name[ball]<<endl;
  23.               system("cls");
  24.     }  
  25.     cout<<"聽"<<name[ball]<<endl;
  26.    system("pause");
  27.    goto re;
  28.    return 0;
  29. }
複製代碼
http://fs-old.mis.kuas.edu.tw/~s1102137106/music/

TOP

返回列表