Pages

Thứ Bảy, 23 tháng 4, 2016

C# Tutorial: Random Number Generator

Here is the code

int count; Random rnd = new Random();
///////////////////////////////////////////////
count = 0; label4.Text = ""; timer1.Start();
///////////////////////////////////////////////
++count;
label4.Text = rnd.Next(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)).ToString();
if (count > Convert.ToInt32(textBox3.Text)) { timer1.Stop(); label4.Text = "Your number is: " + label4.Text; }

Or download the solution

Download

Không có nhận xét nào:

Đăng nhận xét

 

Người đóng góp cho blog

Blogger news

Blogroll

About