First digit represents carry over

what is the meaning of first digit represents carry over

where i need to show that digit

it means if the input was
1
9
1
9
answer would be 1 8
1 is the carry over.

please check my code