Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let days = [
- "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth",
- "tenth", "eleventh", "twelveth",
- ];
- let gifts = [
- "a partridge in a pear tree!",
- "two turtle doves",
- "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 (i, item) in days.iter().enumerate() {
- println!(
- "On the {} day of christmas my true love gave to me",
- item
- );
- for j in (0..=i).rev() {
- println!("\t{}", gifts[j]);
- }
- }
- }
Add Comment
Please, Sign In to add comment