order code. looks more clean
input and output parameters demo.

inout can be used to pass in and out value.
output can only pass out value. Its initial value is always 0