to accept N numbers print the sum of last digit of each odd number
Answers
Answered by
0
Explanation:
First, calculate the reverse of the given number.
.
To the reverse number we apply modulus operator and extract its last digit which is actually the first digit of a number so it is odd positioned digit.
.
The next digit will be even positioned digit, and we can take the sum in alternating turns.
Similar questions