Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace lolll
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void ListBox1_SelectedIndexChanged(object sender, EventArgs e)
  21. {
  22.  
  23.  
  24. int check2 = 0;
  25. int check3 = 0;
  26. Random num = new Random();
  27. int[] pick2 = new int[2];
  28.  
  29. for (int n = 0; n < pick2.Length; n++) ;
  30. {
  31. check2 = num.Next(1, 6);
  32. while (!(pick2.Contains(check2)))
  33. {
  34.  
  35. pick2[n] = check2;
  36. }
  37. textBox1.Text = (check2.ToString());
  38.  
  39. }
  40.  
  41. for (int n = 0; n < pick2.Length; n++) ;
  42. {
  43. check2 = num.Next(1, 6);
  44. while (!(pick2.Contains(check3)))
  45. {
  46.  
  47. pick2[n] = check3;
  48. }
  49. textBox2.Text = (check3.ToString());
  50.  
  51. }
  52.  
  53.  
  54.  
  55.  
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement