随机抽奖程序 string[] s = new string[] { "A", "B", "C", "D", "E", "F", "G" }; Random rand = new Random(); for (int i = 0; i < 50; i++) { int n = rand.Next(s.Length);//随机数赋值 Console.WriteLi
效果图: 主要代码: Form1.cs using System; using System.Drawing; using System.IO; using System.Runtime.InteropServices; using System.Windows.Forms; namespace WindowsFormsApp2 { public partial class Form1 : Form { static string path = "抽奖.txt"; string[] c
package Third; import java.util.Scanner; public class LotteryOdds { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); System.out.println("How many numbers do you need to draw?"); int