更新时间:2023-12-03 11:57:34
如果您使用网络应用程序,那么请输入代码...
首先取两个文本框为你数据...
一键添加
一个文本框结果...
你必须写下面的代码...
int frstnum;
int secnum;
int total;
frstnum = convert.parse(textbox1.text);
secnum = convert.parse (textbozx2.text);
total = frstnum + secnum;
textbox3.text = total.tostring();
meessagebox.show( 结果是+ textbox3.text +);
if ur using web application then go wth the code...
frst take two text boxes for ur data...
one button for for adding
one text box for result...
in button u have to write the below code...
int frstnum;
int secnum;
int total;
frstnum=convert.parse(textbox1.text);
secnum=convert.parse(textbozx2.text);
total=frstnum+secnum;
textbox3.text=total.tostring();
meessagebox.show("the result is + textbox3.text +");