import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int m = input.nextInt();
int k = input.nextInt();
trans(m,k);
} static void trans(int m, int k)
{
int a[] = new int[1024];
int i;
for(i = 0; m != 0; i++)
{
a[i] = m % k;
m /= k;
}
for(i-=1; i >= 0; i--)
System.out.print((a[i]));
}
}
软微java作业第二次-计蒜客进制转换
最新推荐文章于 2021-02-12 10:37:06 发布