Skip to content

Commit

Permalink
Update HexaDecimalToDecimal.java
Browse files Browse the repository at this point in the history
  • Loading branch information
khairi96 authored May 19, 2018
1 parent 0073605 commit d5c673a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Conversions/HexaDecimalToDecimal.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ public static int getHexaToDec(String hex){
int val = 0;
for (int i = 0; i < hex.length(); i++)
{
char c = hex.charAt(i);
int d = digits.indexOf(c);
int d = digits.indexOf(hex.charAt(i));
val = 16*val + d;
}
return val;
Expand Down

0 comments on commit d5c673a

Please sign in to comment.