欢迎来到天天文库
浏览记录
ID:20379006
大小:38.00 KB
页数:3页
时间:2018-10-12
《向量adt数组实现》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;namespace_201111{publicpartialclass_2_3:Form{public_2_3(){InitializeComponent();}intmaxsize=20;
2、intsize=1;int[]a=null;voidinsertatrank(intb,intc){if(b<1
3、
4、b>size){return;}for(inti=size;i>=b+1;i--){a[i]=a[i-1];}a[b]=c;size++;}intremoveatrank(intm){if(m<1
5、
6、m>=size){return0;}else{inte;e=a[m];for(inti=m;i7、listBox1.Items.Clear();for(inti=1;i8、rgse){intb=int.Parse(textBox1.Text.ToString());intc=int.Parse(textBox2.Text.ToString());insertatrank(b,c);disk(a);}privatevoidbutton2_Click(objectsender,EventArgse){intq,p;p=int.Parse(textBox3.Text.ToString());q=removeatrank(p);textBox4.Text=Convert.ToString(q);d9、isk(a);}}}
7、listBox1.Items.Clear();for(inti=1;i8、rgse){intb=int.Parse(textBox1.Text.ToString());intc=int.Parse(textBox2.Text.ToString());insertatrank(b,c);disk(a);}privatevoidbutton2_Click(objectsender,EventArgse){intq,p;p=int.Parse(textBox3.Text.ToString());q=removeatrank(p);textBox4.Text=Convert.ToString(q);d9、isk(a);}}}
8、rgse){intb=int.Parse(textBox1.Text.ToString());intc=int.Parse(textBox2.Text.ToString());insertatrank(b,c);disk(a);}privatevoidbutton2_Click(objectsender,EventArgse){intq,p;p=int.Parse(textBox3.Text.ToString());q=removeatrank(p);textBox4.Text=Convert.ToString(q);d
9、isk(a);}}}
此文档下载收益归作者所有