Skip to content

Commit

Permalink
refs #7 if式
Browse files Browse the repository at this point in the history
  • Loading branch information
euledge committed Feb 13, 2019
1 parent 4c4ddf0 commit aa1164c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Chapter3.5/branches/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "branches"
version = "0.1.0"
authors = ["euledge <[email protected]>"]
edition = "2018"

[dependencies]
10 changes: 10 additions & 0 deletions Chapter3.5/branches/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
fn main() {
let condition = true;
let number = if condition {
5
} else {
"six"
};

println!("The value of number is : {}", number)
}

0 comments on commit aa1164c

Please sign in to comment.