daily pastebin goal
59%
SHARE
TWEET

Untitled

a guest Feb 15th, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn main() {
  2.     let days = [
  3.         "first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth",
  4.         "tenth", "eleventh", "twelveth",
  5.     ];
  6.     let gifts = [
  7.         "a partridge in a pear tree!",
  8.         "two turtle doves",
  9.         "three French hens",
  10.         "Four calling birds",
  11.         "five golden rings.",
  12.         "six geese a-laying",
  13.         "seven swans a-swimming",
  14.         "eight maids a-milking,",
  15.         "nine ladies dancing,",
  16.         "ten lords a-leaping,",
  17.         "eleven pipers piping,",
  18.         "Twelve drummers drumming",
  19.     ];
  20.     for (i, item) in days.iter().enumerate() {
  21.         println!(
  22.             "On the {} day of christmas my true love gave to me",
  23.             item
  24.         );
  25.         for j in (0..=i).rev() {
  26.             println!("\t{}", gifts[j]);
  27.         }
  28.     }
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top