mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-25 05:42:18 +08:00
18 lines
290 B
Rust
18 lines
290 B
Rust
|
fn main() {
|
||
|
// addition
|
||
|
let sum = 5 + 10;
|
||
|
|
||
|
// subtraction
|
||
|
let difference = 95.5 - 4.3;
|
||
|
|
||
|
// multiplication
|
||
|
let product = 4 * 30;
|
||
|
|
||
|
// division
|
||
|
let quotient = 56.7 / 32.2;
|
||
|
let floored = 2 / 3; // Results in 0
|
||
|
|
||
|
// remainder
|
||
|
let remainder = 43 % 5;
|
||
|
}
|