Why do we need to divide hex number with 10? I understood the whole procedure and code but couldn't figure out why we should divide it 10 exactly. Great video though! :D Thank You!
Hello, thanks for the view! The reason we divide by ten is because the problem asks us to find the sum of the decimal digits. Since decimal is a base-10 number system we need to divide (and take the remainder) by 10 to get the digits. You can see an example in the video starting at 4:19
Your videos are extremely helpful , thank you!
Why do we need to divide hex number with 10? I understood the whole procedure and code but couldn't figure out why we should divide it 10 exactly. Great video though! :D Thank You!
Hello, thanks for the view! The reason we divide by ten is because the problem asks us to find the sum of the decimal digits. Since decimal is a base-10 number system we need to divide (and take the remainder) by 10 to get the digits. You can see an example in the video starting at 4:19