summaryrefslogtreecommitdiff
path: root/xmas
diff options
context:
space:
mode:
authorAdam Carpenter <53hornet@gmail.com>2019-03-27 15:32:37 -0400
committerAdam Carpenter <53hornet@gmail.com>2019-03-27 15:32:37 -0400
commit67cdcc2e12118becb823e20a40cc2687f2b8425a (patch)
treeed92c3234b89079e6d4cf36f5e80c5ffa79def48 /xmas
parente25482fca375d318a39c3b54db396b0db6e0b263 (diff)
downloadlearning-rust-67cdcc2e12118becb823e20a40cc2687f2b8425a.tar.xz
learning-rust-67cdcc2e12118becb823e20a40cc2687f2b8425a.zip
Started Rust in Action MEAP.
Diffstat (limited to 'xmas')
-rw-r--r--xmas/Cargo.lock4
-rw-r--r--xmas/Cargo.toml7
-rw-r--r--xmas/out.txt114
-rw-r--r--xmas/src/main.rs42
4 files changed, 0 insertions, 167 deletions
diff --git a/xmas/Cargo.lock b/xmas/Cargo.lock
deleted file mode 100644
index 033bd72..0000000
--- a/xmas/Cargo.lock
+++ /dev/null
@@ -1,4 +0,0 @@
-[[package]]
-name = "xmas"
-version = "0.1.0"
-
diff --git a/xmas/Cargo.toml b/xmas/Cargo.toml
deleted file mode 100644
index d10c790..0000000
--- a/xmas/Cargo.toml
+++ /dev/null
@@ -1,7 +0,0 @@
-[package]
-name = "xmas"
-version = "0.1.0"
-authors = ["Adam Carpenter <adam.carpenter@adp.com>"]
-edition = "2018"
-
-[dependencies]
diff --git a/xmas/out.txt b/xmas/out.txt
deleted file mode 100644
index 55ae012..0000000
--- a/xmas/out.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-
-On the 1st day of Christmas,
-My true love gave to me
-A partridge in a pear tree
-
-On the 2nd day of Christmas,
-My true love gave to me
-Two turtle doves and
-A partridge in a pear tree
-
-On the 3rd day of Christmas,
-My true love gave to me
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 4th day of Christmas,
-My true love gave to me
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 5th day of Christmas,
-My true love gave to me
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 6th day of Christmas,
-My true love gave to me
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 7th day of Christmas,
-My true love gave to me
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 8th day of Christmas,
-My true love gave to me
-Eight maids a-milking
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 9th day of Christmas,
-My true love gave to me
-Nine ladies dancing
-Eight maids a-milking
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 10th day of Christmas,
-My true love gave to me
-Ten lords a-leaping
-Nine ladies dancing
-Eight maids a-milking
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 11th day of Christmas,
-My true love gave to me
-Eleven pipers piping
-Ten lords a-leaping
-Nine ladies dancing
-Eight maids a-milking
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
-
-On the 12th day of Christmas,
-My true love gave to me
-Twelve drummers drumming
-Eleven pipers piping
-Ten lords a-leaping
-Nine ladies dancing
-Eight maids a-milking
-Seven swans a-swimming
-Six geese a-laying
-Five golden rings
-Four calling birds
-Three French hens
-Two turtle doves and
-A partridge in a pear tree
diff --git a/xmas/src/main.rs b/xmas/src/main.rs
deleted file mode 100644
index e725a26..0000000
--- a/xmas/src/main.rs
+++ /dev/null
@@ -1,42 +0,0 @@
-fn main() {
- let days = [
- "1st",
- "2nd",
- "3rd",
- "4th",
- "5th",
- "6th",
- "7th",
- "8th",
- "9th",
- "10th",
- "11th",
- "12th",
- ];
- let gifts = [
- "A partridge in a pear tree",
- "Two turtle doves and",
- "Three French hens",
- "Four calling birds",
- "Five golden rings",
- "Six geese a-laying",
- "Seven swans a-swimming",
- "Eight maids a-milking",
- "Nine ladies dancing",
- "Ten lords a-leaping",
- "Eleven pipers piping",
- "Twelve drummers drumming",
- ];
-
- // for each day
- for mut each in 0..12 {
- println!("\nOn the {} day of Christmas,", days[each]);
- println!("My true love gave to me");
-
- // print associated lyrics
- for i in (0..each+1).rev() {
- println!("{}", gifts[i]);
- }
-
- }
-}