Skip to content

Branches - Farah | Created program to convert binary number to decimal#37

Open
in-formation wants to merge 1 commit intoAda-C12:masterfrom
in-formation:master
Open

Branches - Farah | Created program to convert binary number to decimal#37
in-formation wants to merge 1 commit intoAda-C12:masterfrom
in-formation:master

Conversation

@in-formation
Copy link

Binary and Decimal

Congratulations! You're submitting your assignment.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

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

Nice work, you this the requirements on this project. Well done.


binary_array.each do |digit|
total += digit*(2**(i-1))
i -= 1

Choose a reason for hiding this comment

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

Nice work going backwards through the array.

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