Condition if multiple of 2 do not exist
if ( multiple_of_2 == false ) { cout << " - 1" << " STRNEWLINE " ; return ; } int last_val = s [ s . length ( ) - 1 ] - '0' ; int second_last_val = s [ s . length ( ) - 2 ] - '0' ;