mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-24 21:32:15 +08:00
18 lines
290 B
Rust
Executable File
18 lines
290 B
Rust
Executable File
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;
|
|
}
|