摘要: unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) btn1: TButton; lst_file: TListBox; lst_path: TListBox; lbl1: TLabel; lbl2: TLabel; procedure btn1Click(Sender: TObject); private { Private declarations } { 阅读全文
posted @ 2012-09-27 22:04 斗天! 阅读(351) 评论(0) 推荐(0) 编辑
摘要: 将5个小球进行组合,每次取出4个,问一共有多少种取法,将每一种情况列出来。。。?先将情况列出来。。。。下面是代码:private void button1_Click(object sender, EventArgs e) { ArrayList al = new ArrayList(); string str = "abcde"; int i = 0; int a = 0; int b = 0; int c = 0; for (i = 0; i < str.Length; i++)//第1个数取值 { for (a = i + 1; a < str.Lengt 阅读全文
posted @ 2012-09-23 16:50 斗天! 阅读(123) 评论(0) 推荐(0) 编辑