From 052fb8766799e344ed593fa0ce196275f87234b4 Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 13 Sep 2021 09:21:29 -0400 Subject: [PATCH] bleh --- rustbook/hello_cargo/src/main.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/rustbook/hello_cargo/src/main.rs b/rustbook/hello_cargo/src/main.rs index 292e63b..b43b728 100644 --- a/rustbook/hello_cargo/src/main.rs +++ b/rustbook/hello_cargo/src/main.rs @@ -1,9 +1,27 @@ +const SEP: &str = "\n---- bleh ----\n"; + fn main() { println!("Hello, world!"); + println!("{}", SEP); + println!("0x{:x}", 0b1111_1010_1111_1010_1111_1010_1111); println!("0b{:b}", 0xfafafaf); println!("{}", 0xfafafaf); println!("{}", 0xfeefee); println!("0b{:b}", 0xfeefee); + + println!("{}", SEP); + + let sum = 5 + 10; + let difference = 95.5 - 4.3; + let product = 4 * 30; + let quotient = 56.7 / 32.2; + let remainder = 43 % 5; + + println!("sum: {}", sum); + println!("difference: {}", difference); + println!("product: {}", product); + println!("quotient: {}", quotient); + println!("remainder: {}", remainder); }