while(n!=0) { mod = n%r; q[i++] = mod;//i初始化为0 n/=r; }
数据结构实验之栈:进制转换
原文:http://www.cnblogs.com/6bing/p/4113836.html