codinasion-archive / codinasion-monorepo

Community Monorepo
https://codinasion.org
MIT License
52 stars 170 forks source link

[Program]: Convert hexadecimal to octal #1123

Open harshraj8843 opened 1 year ago

harshraj8843 commented 1 year ago

Description

Write a program to convert hexadecimal to octal

Hexadecimal is a base-16 number system. It uses sixteen digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. The digits are called hexits. A hexit is the smallest unit of information in a computer. A hexit can be used to represent a single value, such as 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, or F, or it can be used to represent a single state, such as on or off.

Octal is a base-8 number system. It uses only eight digits: 0, 1, 2, 3, 4, 5, 6, and 7. The digits are called octits. An octit is the smallest unit of information in a computer. An octit can be used to represent a single value, such as 0, 1, 2, 3, 4, 5, 6, or 7, or it can be used to represent a single state, such as on or off.

To convert a hexadecimal number to octal, we can use the following algorithm:

  1. Convert the hexadecimal number to decimal.
  2. Convert the decimal number to octal.
Input  : A
Output : 12

Tracking Issues

kittoteja commented 11 months ago

hi, i would like to work on this can you assign me this?

harshraj8843 commented 11 months ago

Hey @kittoteja

You can comment !assign on any good first issue you want to contribute to, to be auto-assigned

!assign

See example https://github.com/codinasion/codinasion/issues/1282

kittoteja commented 11 months ago

!assign

harshraj8843 commented 11 months ago

Hey @kittoteja This is not a good-first-issue