rust/src/test/run-pass/div-mod.rs
Brian Anderson 518dc52f85 Reformat
This changes the indexing syntax from .() to [], the vector syntax from ~[] to
[] and the extension syntax from #fmt() to #fmt[]
2011-08-20 11:04:00 -07:00

19 lines
326 B
Rust

// -*- rust -*-
fn main() {
let x: int = 15;
let y: int = 5;
assert (x / 5 == 3);
assert (x / 4 == 3);
assert (x / 3 == 5);
assert (x / y == 3);
assert (15 / y == 3);
assert (x % 5 == 0);
assert (x % 4 == 3);
assert (x % 3 == 0);
assert (x % y == 0);
assert (15 % y == 0);
}