#include<iostream>
#include<cstdlib>
#include<time.h>
int main()
{
int a,i;
unsigned seed;
seed=(unsigned)time(NULL);
srand(seed);
cout<<"歡迎來到萬惡的轉蛋機,快來試試你的非洲運吧(笑)"<<endl;
cout<<"請按1開始十連抽"<<endl;
for(i=0;i<10;i++)
{
if(rand()%1000<10)
{
cout<<"恭喜抽到>>5星英靈!!!!!!"<<endl;
}
else
{
if(rand()%1000<50)
{
cout<<"恭喜抽到>>五星禮裝"<<endl;
}
else
{
if(rand()%1000<450)
{
cout<<"恭喜抽到>>3星英靈"<<endl;
}
else
{
if(rand()%1000<850)
{
cout<<"恭喜抽到>>三星禮裝"<<endl;
}
else
{
if(rand()%1000<970)
{
cout<<"恭喜抽到>>四星禮裝"<<endl;
}
else
{
cout<<"恭喜抽到>>4星英靈~~"<<endl;
}
}
cout<<endl;
cout<<"再一次10連請按1~大家課!大家課!"<<endl;