Numeric operations

In this article we will cover numeric operations in Rust

Addition

Variales are names given to computer memory location where your store data in a program. In Rust, we define variables with let:

1
2
3
fn main() {
	let add = 8 + 11;
}

Substraction

1
2
3
fn main() {
	let subs = 1 - 1;
}

Multiplication

1
2
3
fn main() {
	let mult = 8 * 9;
}

Division

1
2
3
fn main() {
	let div = 4 / 6;
}

Remainder

1
2
3
fn main() {
	let tem = 3 % 2;
}
Theme Stack designed by Jimmy