تبلیغات
if (a == 1)
             {
                 listBox1.Items.Add("disk\t"+a+"\tfrom tower\t"+ch1+"\tto tower\t"+ch3);
             }
             else
             {
                 fun((a-1),ch1,ch3,ch2);
                 listBox1.Items.Add("disk\t"+a+"\tfrom tower\t"+ch1+"\tto tower\t"+ch3);
                 fun((a - 1), ch2, ch1, ch3);
             }
             return 0;