Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void button1_Click(object sender, EventArgs e)
- {
- textBox2.Text = "";
- textBox3.Text = "";
- textBox4.Text = "";
- if (radioButton1.Checked)
- {
- number = r.Next(0, 101);
- }
- if (radioButton2.Checked)
- {
- number = int.Parse(textBox1.Text);
- }
- }
- private void button2_Click(object sender, EventArgs e)
- {
- textBox2.Text = "";
- textBox3.Text = "";
- textBox4.Text = "";
- int tries = 0;
- int guess=int.Parse(textBox2.Text);
- if(guess<number)
- {
- textBox3. Text = "Надолу";
- }
- else
- {
- textBox3.Text = "Нагоре";
- }
- tries++;
- textBox4.Text = tries.ToString();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement