0对应a,b,c
1对应e,f,g
2对应h,j,k,r
3对应l,z,x
4对应v,n,m
5对应q,w,e
6对应r,t,y
7对应u,i,o
8对应a,s,d
9对应f,g,c,wstr为两个数字如13,需表达为对应1和对应3的拼接,结果为e,f,g,l,z,x

解决方案 »

  1.   

    const
      Texts: array[0..9] of string = (
        'abc', 'efg', 'hikr', 'lzx', 'vnm', 'qwe', 'rty', 'uio', 'asd', 'fgcw');
    begin
      Caption := Texts[1] + Texts[3];
    end;
      

  2.   


    procedure TForm1.Button1Click(Sender: TObject);
    const
      ary:array [0..9] of string= ('abc', 'efg','hjkr','lzx','vnm','qwe','rty','uio','asd','fgcw');
    var
      str:string;
    begin
      str:=Edit1.Text;
      Edit2.Text:=ary[strtoint(str[1])]+ary[strtoint(str[2])];
    end;
      

  3.   

    const
        strs:array[0..9] of string=('a,b,c','e,f,g','h,j,k,r','l,z,x','v,n,m','q,w,e','r,t,y','j,i,o','a,s,d','f,g,c,w');var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    var
        str,strValue:string;
        i,j:integer;
    begin
        str:='013';
        strValue:='';
        for i:=1 to length(str) do
        begin
            for j:=1 to length(strs[StrToInt(str[i])]) do
                strValue:=strValue+strs[StrToInt(str[i])][j];
            if i<Length(str) then
                strValue:=strValue+',';
        end;    Memo1.Lines.Text:=strValue;
    end;
      

  4.   

    拿分来!
    const
      TextsTable: array[0..9] of string = (
        'abc', 'efg', 'hikr', 'lzx', 'vnm', 'qwe', 'rty', 'uio', 'asd', 'fgcw');function EncryptID(const ID: Byte): string;
    begin
      if ID > 99 then Exit; // 只能是两位数。
      Result := TextsTable[ID div 10] + TextsTable[ID mod 10];
    end;