var
temp:integer;
i:integer;
leng:integer;
temp_jari:integer;
begin
leng:=length(edit1.text);
for i:=1 to leng do
begin
temp_jari:=leng-i;
temp:=strtoint(copy(Edit1.text,i,1));
if leng<>4 then
begin
if temp_jari =3 then
edit2.text:=form1.edit2.Text+'만';
end;
if leng<>8 then
begin
if temp_jari =7 the
edit2.text:= edit2.Text+'억';
end;
if temp <> 0 then
begin
edit2.text:= edit2.Text+ han(temp)+jari(temp_jari) ;
end
else
begin
edit2.text:= edit2.Text +han(temp) ;
end;
end;
edit2.text:= edit2.Text+'원';
end;
function jari(temp_jari:integer):string;
begin
case temp_jari of
0:jari:='';
1:jari:='십';
2:jari:='백';
3:jari:='천';
4:jari:='';
5:jari:='십';
6:jari:='백';
7:jari:='천';
8:jari:='';
9:jari:='십' ;
10:jari:='백';
11:jari:='천';
end;
end;
function han(temp:integer):string;
begin
case temp of
1:han:='일';
2:han:='이';
3:han:='삼';
4:han:='사';
5:han:='오';
6:han:='육';
7:han:='칠';
8:han:='팔';
9:han:='구';
else
han:='';
end;
end;
|