嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 1 元微信扫码支付:1 元
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
大转盘
public partial class Index : System.Web.UI.Page
{
string s = "0|很遗憾,本次您未抽中奖";
int[] arr = { 67, 112, 202, 292, 337 };
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(ZhuanPan());
}
public string ZhuanPan()
{
Random ran = new Random();
int num = ran.Next(0, 360);
if (0 < num && num < 45)
{
if (checkLottery(3))
{
s = "22|恭喜您抽中了三等奖";
}
else
{
num = ran.Next(0, 4);
s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
}
}
else if (225 < num && num < 270)
{
if (checkLottery(2))
{
s = "247|恭喜您抽中了二等奖";
}
else
{
num = ran.Next(0, 4);
s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
}
}
else if (135 < num && num < 180)
{
if (checkLottery(1))
{
s = "157|恭喜您抽中了一等奖";
}
else
{
num = ran.Next(0, 4);
s = arr[num].ToString() "|很遗憾,本次您未抽中奖";
}
}
else
{
return (num).ToString() "|很遗憾,本次您未抽中奖";
}
return s;