Phones, they help me with school work and provide entertainment.
Here's a solution that works except for the leading zeros. Unclear (to me) why they need to be there and what's the logic?
public static void main(String[] args)
{
int number, base;
Scanner Cin = new Scanner(System.in);
System.out.print("Enter a decimal number between 1 and 100,000: ");
number = Cin.nextInt();
System.out.print("Enter a base from 2-16: ");
base = Cin.nextInt();
System.out.format("The number %d in base %d is %s.", number, base, Integer.toString(number, base).toUpperCase());
}
Answer:
Microsoft Excel or Google sheets.
Explanation: