Untitled
unknown
plain_text
8 days ago
726 B
1
Indexable
Never
fn main() { let verses = vec!("A partridge in a pear tree", "Two turtle doves\nAnd ", "Three French hens\n", "Four calling birds\n", "Five gold rings\n", "Six geese a-laying\n", "Seven swans a-swimming\n", "Eight maids a-milking\n", "Nine ladies dancing\n", "Ten lords a-leaping\n", "Eleven pipers piping\n", "Twelve drummers drumming\n"); let days = vec!("first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eighth", "ninth", "tenth", "eleventh", "twelfth"); for i in 0..12 { println!("On the {} day of Christmas my true love sent to me", days[i]); for verse in (0..=i).rev() { print!("{}", verses[verse]); } println!("\n") } }
Leave a Comment