//十进制数转化为任意进制
#include "stdafx.h"
#define L 10
void c(int N, int r);
int main()
{
c(3467,8);
return 0;
}
void c(int N,int r) {
int s[L], top;
int x;
top = -1;
while (N!=0) {
s[++top] = N % r;
N = N / r;
}
while (top!=-1) {
x = s[top--];
printf("%d",x);
}
printf("\n");
}