mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-27 06:23:08 +08:00
@ -11,9 +11,7 @@ import java.util.ArrayList;
|
||||
public class DecimalToAnyBase {
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
BufferedReader br = new BufferedReader(
|
||||
new InputStreamReader(System.in)
|
||||
);
|
||||
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
|
||||
System.out.println("Enter the decimal input below: ");
|
||||
int decInput = Integer.parseInt(br.readLine());
|
||||
System.out.println();
|
||||
@ -22,15 +20,10 @@ public class DecimalToAnyBase {
|
||||
int base = Integer.parseInt(br.readLine());
|
||||
System.out.println();
|
||||
|
||||
System.out.println("Decimal Input" + " is: " + decInput);
|
||||
System.out.println(
|
||||
"Value of " +
|
||||
decInput +
|
||||
" in base " +
|
||||
base +
|
||||
" is: " +
|
||||
convertToAnyBase(decInput, base)
|
||||
);
|
||||
System.out.println("Decimal Input"
|
||||
+ " is: " + decInput);
|
||||
System.out.println("Value of " + decInput + " in base " + base
|
||||
+ " is: " + convertToAnyBase(decInput, base));
|
||||
|
||||
br.close();
|
||||
}
|
||||
|
Reference in New Issue
Block a user