mirror of https://github.com/KaiserY/trpl-zh-cn
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
290 B
18 lines
290 B
3 years ago
|
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;
|
||
|
}
|