Given a non-negative integer , compute the sum of the digits in the first and in the second halves of . Your program must also indicate the order relationship among those quantities. This computation has to be done only when the number of digits of is even.
The first half of a number with
digits (for even
)
is formed by the
left digits and the second half is formed by the
right digits. For example, the number
,
has first half
and second half
.
The input is a non-negative integer with .
The sum of the digits of the first half and the sum of the digits of the second half together with their relationship, provided that the number of digits is even.
Follow the format of the examples.
Author: Unknown
Translator: Maria J. Serna
Generation: 2026-01-25T16:47:02.677Z
© Jutge.org, 2006–2026.
https://jutge.org