Each language defines its own set of casting rules and its operators semantics. Your use of modulo (%) is what makes the results so different.
Each language defines its own set of casting rules and its operators semantics. Your use of modulo (%) is what makes the results so different.