Skip to content

doc: add comment so the user will have an idea about the result #4341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
fn main() {
// addition
let sum = 5 + 10;
let sum = 5 + 10; // 15

// subtraction
let difference = 95.5 - 4.3;
let difference = 95.5 - 4.3; // 91.2

// multiplication
let product = 4 * 30;
let product = 4 * 30; // 120

// division
let quotient = 56.7 / 32.2;
let quotient = 56.7 / 32.2; // Approximately 1.760869565
let truncated = -5 / 3; // Results in -1

// remainder
let remainder = 43 % 5;
let remainder = 43 % 5; // 3
}