Visual C#_ Framework.猜数字小游戏
来源:互联网 发布:开票软件打不开没响应 编辑:程序博客网 时间:2024/05/21 12:47
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;
namespace WindowsFormsApplication2{ public partial class Form2 : Form
{ Random r = new Random(); int count; int num; public Form2() { InitializeComponent(); }
private void button2_Click(object sender, EventArgs e) { int num2 = Convert.ToInt32(this.textBox1.Text); if (num2 > num) { MessageBox.Show("大了,再猜","提示",MessageBoxButtons.OK,MessageBoxIcon.Asterisk); count++; } else if (num2 < num) { MessageBox.Show("小了再猜", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); count++; } else if(num2 == num) {
MessageBox.Show("恭喜你猜中了!!一种猜了"+count+"次", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); count++; } }
private void button1_Click(object sender, EventArgs e) { this.num = r.Next(1,100); count = 0; this.button2.Enabled=true; } }}
- Visual C#_ Framework.猜数字小游戏
- c语言猜数字小游戏
- C语言猜数字小游戏
- 【C语言】猜数字小游戏
- C语言小游戏:猜数字
- 面向对象_猜数字小游戏案例
- c语言之猜数字的小游戏
- 猜数字小游戏[C语言][自制]
- 简单的C语言猜数字小游戏
- c语言:编写猜数字小游戏。
- C语言编写猜数字小游戏
- 用c语言编写猜数字小游戏
- C语言- 猜测数字小游戏
- 猜数字小游戏
- 猜数字小游戏
- 猜数字小游戏(MiniGUI)
- 猜数字小游戏
- 猜数字小游戏
- 如何在SharePoint中隐藏回收站
- 百度音乐接口的应用
- OpenCV中的HOG+SVM物体分类
- gps hal用到的函数1--fcntl
- 汇编结构体的声明和引用
- Visual C#_ Framework.猜数字小游戏
- php中的traits
- C预编译 -编译-执行
- 问道——程序员的自我修养
- 李朝政治 (朝鮮歷史 韓長庚)
- gps hal用到的函数2--epoll
- 逛了一下,觉得不错,故参考并发之以作收藏
- 图_邻接矩阵
- 标签部分网址