Remainder Operator

The remainder operator gives us the value that's left over after putting one number into another as many times as possible. (TODO: Look up the math term for this)

For example, 2 goes into 9 four times with a remainder of 1. So, this code outputs:

alfa is 1

SOURCE CODE

fn main() {
  let alfa = 9 % 2;
  println!("alfa is {alfa}");
}

CODE RUNNER