有人能做下这样的抽签软件吗

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:13:39
要求从1到XX,随机抽取XX个不重复的数字,并且在抽签前可备注某几个数值X是不能被抽到的(X都是可输入的数字),最好抽签的时候有数字滚动效果,而且数字可以是*,不让别人看到的,有的话麻烦发到我邮箱lishen123@sohu.com,万分感谢!

你要的那个很复杂哦,我刚学C#的时候尝试过生成任意两正整数间不重复的随机数,没界面的,方法比较笨,仅供参考:
using System;
using System.Collections.Generic;

public class program
{
public static void Main()
{
int s = 0;
int t = 0;
int num1 = 0;
int num2 = 0;
string str1;
string str2;
string str;
do
{
/*int s = 0;*/
Console.WriteLine("请输入要生成的随机整数的下限:");
str1 = Console.ReadLine();
Console.WriteLine("请输入要生成的随机整数的上限:");
str2 = Console.ReadLine();
str = str1 + str2;
if (str1 == null || str1.Length == 0||str2 == null||str2.Length == 0)
{
Console.WriteLine("输入的上限或下限不能为空,请重新输入!");
t = 1;
}
else
{
System.Text.ASC