aayushi-droid / Edabit-Solutions

Edabit Solutions using Cpp(C++)
MIT License
39 stars 154 forks source link

added hexToBinaryUsingLoops.cpp #346

Closed jatinAgarwala closed 3 years ago

jatinAgarwala commented 3 years ago

Description

enter here if you have any details- A code for hexToBinary had been added to the repository after this issue was assigned to me. However, the code had the following inaccuracies:

  1. The function did not return the string, instead it printed the result on the screen
  2. It did not consider the input format including 0x, as a result of which, the output it gave was a 12-bit number, instead of an 8-bit number, which was the requirement of the problem.

Taking the above points into consideration, I have made this PR with a new code. However, I changed the name of my program to hexToBinaryUsingLoops.cpp as the issue I had created was to write a new program, and not to make changes to the already existing code. I request you to allow both codes to be a part of the repository as each has a different approach to the problem.

Program Name - hexToBinaryUsingLoops.cpp Issue No.- #337

Type issue number after hash(#)

Checklist(self check)