-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.java
35 lines (18 loc) · 828 Bytes
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import java.util.ArrayList;
import java.util.Scanner;
import java.math.*;
public class Main {
public static void main(String[] args) {
Scanner sabela = new Scanner(System.in);
System.out.println("Enter the current base ");
int oldBase = sabela.nextInt();
System.out.println("Enter the desired base ");
int newBase = sabela.nextInt();
System.out.println("Enter a number ");
Scanner sabelas = new Scanner(System.in);
String value = sabelas.nextLine();
BaseConverter zzrot = new BaseConverter();
String bar = zzrot.convertBase(oldBase, newBase, value);
System.out.println("You entered the number " + value + ", converting from " + oldBase + " to new base " + newBase+ " to get a final value of " + bar);
}
}