If current value is odd , carry 26 to the next index value
if ( ( a1 [ i ] & 1 ) != 0 ) { if ( i + 1 <= N ) { a1 [ i + 1 ] += 26 ; } } a1 [ i ] = ( int ) a1 [ i ] / 2 ; } for ( int i = 1 ; i <= N ; i ++ ) { System . out . print ( ( char ) ( a1 [ i ] + 97 ) ) ; } }