Skip to content

Created HexaDecimalToDecimal.java #424

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 20, 2018

Conversation

khairi96
Copy link
Contributor

added HexaDecimalToDecimal.java on conversions.
it converts Hexadecimal input to decimal.

added HexaDecimalToDecimal.java on conversions.
it converts Hexadecimal input to decimal.
Copy link

@christianbender christianbender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good Work! I have a request

int val = 0;
for (int i = 0; i < hex.length(); i++)
{
char c = hex.charAt(i);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This line is useless. Because you can add the result of hex.charAt(i) right away to the method indexOf(...) (below)

@khairi96
Copy link
Contributor Author

Done ! thank you for your consideration.

@christianbender christianbender merged commit ad0e95c into TheAlgorithms:master May 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants