Posts

Showing posts with the label Sum of Digits of a Five Digit Number in C - Hacker Rank Solution.

Sum of Digits of a Five Digit Number in C - Hacker Rank Solution.

Image
  Objective The modulo operator,  % , returns the remainder of a division. For example,  4 % 3 = 1  and  12 % 10 = 2 . The ordinary division operator,  / , returns a truncated integer value when performed on integers. For example,  5 / 3 = 1 . To get the last digit of a number in base 10, use it as the modulo divisor.