Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Random y = new Random();
- int a1 = y.Next(0, 101);
- string a = a1.ToString();
- Random z = new Random();
- int b1 = z.Next(0, 101);
- string b = b1.ToString();
- textBox1.Text = a;
- Random rt1 = new Random();
- int rt = rt1.Next(1, 4);
- if (rt == 1) textBox1.Text = textBox1.Text + "+";
- if (rt == 2) textBox1.Text = textBox1.Text + "-";
- if (rt == 3) textBox1.Text = textBox1.Text + "*";
- textBox1.Text = textBox1.Text + b1;
- Random r1 = new Random();
- int r11 = r1.Next(0, 10001);
- string r111 = r11.ToString();
- radioButton1.Text = r111;
- Random r2 = new Random();
- int r22 = r2.Next(0, 10001);
- string r222 = r22.ToString();
- radioButton2.Text = r222;
- Random r3 = new Random();
- int r33 = r3.Next(0, 10001);
- string r333 = r33.ToString();
- radioButton3.Text = r333;
- int abp = a1 + b1;
- string ab1 = abp.ToString();
- int abm = a1 - b1;
- string ab2 = abm.ToString();
- int abu = (a1 * b1);
- string ab3 = abu.ToString();
- Random rand = new Random();
- int rand1 = rand.Next(1, 4);
- if ((rand1 == 1) && (rt == 1)) radioButton1.Text = ab1;
- if ((rand1 == 1) && (rt == 2)) radioButton1.Text = ab2;
- if ((rand1 == 1) && (rt == 3)) radioButton1.Text = ab3;
- if ((rand1 == 2) && (rt == 1)) radioButton2.Text = ab1;
- if ((rand1 == 2) && (rt == 2)) radioButton2.Text = ab2;
- if ((rand1 == 2) && (rt == 3)) radioButton2.Text = ab3;
- if ((rand1 == 3) && (rt == 1)) radioButton3.Text = ab1;
- if ((rand1 == 3) && (rt == 2)) radioButton3.Text = ab2;
- if ((rand1 == 3) && (rt == 3)) radioButton3.Text = ab3;
- foreach (RadioButton control in this.Controls.OfType<RadioButton>())
- {
- control.Checked = false;
- }
- timer1.Stop();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement