check if the sum of 1st and last digit of the number is equal to the sum of all remaining digits.
Answers
Answered by
0
last digit.
Suppose if n = 1234
then last Digit = n % 10 => 4
To finding first digit of a number is little expensive than last digit. To find first digit of a number we divide the given number by 10 until number is greater than 10. At the end we are left with the first digit.
Similar questions