tasks a-s
This commit is contained in:
parent
47bf37c096
commit
b83f433714
12433 changed files with 156208 additions and 123 deletions
|
|
@ -0,0 +1,7 @@
|
|||
public static long backToTen(String num, int oldBase){
|
||||
return Long.parseLong(num, oldBase); //takes both uppercase and lowercase letters
|
||||
}
|
||||
|
||||
public static String tenToBase(long num, int newBase){
|
||||
return Long.toString(num, newBase);//add .toUpperCase() for capital letters
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
public static BigInteger backToTenBig(String num, int oldBase){
|
||||
return new BigInteger(num, oldBase); //takes both uppercase and lowercase letters
|
||||
}
|
||||
|
||||
public static String tenBigToBase(BigInteger num, int newBase){
|
||||
return num.toString(newBase);//add .toUpperCase() for capital letters
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue