[说明]
下面程序实现十进制向其他进制的转换。
[Java程序]
C1ass Node
int data;
Node next;
class Transform
private Node top;
publiC void print()
Node P;
while(top !=null)
P=top;
if(P.data>9)
System.out.print((char)(p.data+55));
else
System.out.print(p.data);
top=P.next;
public void Trans(int d,int i)(//d为数字;i为进制
int m;
(1) n=false;
Node P;
while(d>0)
(2) ;
d=d/i;
P=flew Node();
if( (3) )
P.data=m;
(4) ;
top=P;
n=true;
else
p.data=m;
(5) ;
toP=P;