Java10进制转换为任意进制

import java.util.*;
public class Main
{
	public static void main(String args[])
	{
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext())
		{
			int n = sc.nextInt();
			int x = sc.nextInt();
			System.out.println(Integer.toString(n, x).toUpperCase());
		}
	}
}

 

你可能感兴趣的:(Java,我的编程笔记)