网页资讯视频图片知道文库贴吧地图采购
进入贴吧全吧搜索

 
 
 
日一二三四五六
       
       
       
       
       
       

签到排名:今日本吧第个签到,

本吧因你更精彩,明天继续来努力!

本吧签到人数:0

一键签到
成为超级会员,使用一键签到
一键签到
本月漏签0次!
0
成为超级会员,赠送8张补签卡
如何使用?
点击日历上漏签日期,即可进行补签。
连续签到:天  累计签到:天
0
超级会员单次开通12个月以上,赠送连续签到卡3张
使用连续签到卡
12月30日漏签0天
c#吧 关注:188,713贴子:824,143
  • 看贴

  • 图片

  • 吧主推荐

  • 视频

  • 游戏

  • 3回复贴,共1页
<<返回c#吧
>0< 加载中...

求大神罩,求解,自己编的程序有错误,求大神指出来

  • 只看楼主
  • 收藏

  • 回复
  • 逐梦858
  • c#求知者
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
winform编程
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
int[] a=new int[10];
int b = 0;
int c1 = 0;
int c2 = 0;
int c;
private void Form1_Load(object sender, EventArgs e)
{
}
private void button10_Click(object sender, EventArgs e)
{
a[b] = 0;
textBox1.Text += 0;
b++;
}
private void button9_Click(object sender, EventArgs e)
{
a[b] = 1;
textBox1.Text += 1;
b++;
}
private void button8_Click(object sender, EventArgs e)
{
a[b] = 2;
textBox1.Text += 2;
b++;
}
private void button7_Click(object sender, EventArgs e)
{
a[b] = 3;
textBox1.Text += 3;
b++;
}
private void button6_Click(object sender, EventArgs e)
{
a[b] = 4;
textBox1.Text += 4;
b++;
}
private void button5_Click(object sender, EventArgs e)
{
a[b] = 5;
textBox1.Text += 5;
b++;
}
private void button4_Click(object sender, EventArgs e)
{
a[b] = 6;
textBox1.Text += 6;
b++;
}
private void button1_Click(object sender, EventArgs e)
{
a[b] = 7;
textBox1.Text += 7;
b++;
}
private void button2_Click(object sender, EventArgs e)
{
a[b] = 8;
textBox1.Text += 8;
b++;
}
private void button3_Click(object sender, EventArgs e)
{
a[b] = 9;
textBox1.Text += 9;
b++;
}
private void button12_Click(object sender, EventArgs e)
{
if (b != 0)
{
c1 = a[b];
b = 0;
textBox1.Text += "+";
}
}
private void button13_Click(object sender, EventArgs e)
{
c2 = a[b];
c = c1 + c2;
textBox1.Text = Convert.ToString(c1 + c2);
button12.Enabled = true;
}
private void button11_Click(object sender, EventArgs e)
{
b = 0;
c = c1 = c2 = 0;
textBox1.Text=null;
}
}


  • 逐梦858
  • c#求知者
    5
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
不知道是哪里错了


2025-12-30 05:05:59
广告
不感兴趣
开通SVIP免广告
  • 小猪爱上羊
  • c#大牛
    11
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
textbox.text值类型是string


登录百度账号

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!
  • 贴吧页面意见反馈
  • 违规贴吧举报反馈通道
  • 贴吧违规信息处理公示
  • 3回复贴,共1页
<<返回c#吧
分享到:
©2025 Baidu贴吧协议|隐私政策|吧主制度|意见反馈|网络谣言警示