日期:2014-05-18 浏览次数:21407 次
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication8
{
    class Program
    {
        public void fun(int min, int max,string a)
        {
            if (min == 0)
            {
                fun1(max, a);
            }
            else
            {
                for (int i = min; i <= max; i++)
                    fun1(i, a);
            }
        }
        private void fun1(int p,string a)
        {
            string b;
            if (p == 1)
            {
                for (int i1 = 0; i1 < 13; i1++)
                {
                    b = a.Substring(i1, 1);
                    Console.WriteLine("{0}", b);
                }
            }
            if (p == 2)
            {
                for (int i1 = 0; i1 < 13; i1++)
                {
                    for (int i2 = 0; i2 < 13; i2++)
                    {
                        b = a.Substring(i1, 1)+a.Substring(i2,1);
                        Console.WriteLine("{0}", b);
                    }
                }
            }
            if (p == 3)
            {
                for (int i1 = 0; i1 < 13; i1++)
                {
                    for (int i2 = 0; i2 < 13; i2++)
                    {
                        for (int i3 = 0; i3 < 13; i3++)
                        {