- #include<iostream>
- #include<cstdlib>
- using namespace std;
- int main()
- {
- string n[5]={"齊爾","甲蟲","悟空","兔子","瑟斐斯"};
- srand(time(NULL));
- cout<<"☆★☆抽籤程式☆★☆"<<endl;
- cout<<"今天你要玩什麼角色?"<<endl;
- system("pause");
- system("cls");
-
-
- for(int i=1;i<=50;i++)
- {
- if(i%2==1)
- {
- cout<<"☆★☆抽籤中☆★☆"<<endl;
- }else
- {
- cout<<"★☆★抽籤中★☆★"<<endl;
- cout<<"是:"<<n[rand()%5]<<endl;
- }
- if(i<30)
- _sleep(50);
- else
- _sleep(50+(i-30)*(i-30));
- system("cls");
- }
- cout<<"選中的角色是:"<<n[rand()%5]<<endl;
-
- system("pause");
- return 0;
- }
複製代碼 |