Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
twelveDays
import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { firstDay(); System.out.println(); System.out.println("On the second day of Christmas my true love gave to me,"); secondDay(); System.out.println(); System.out.println("On the third day of Christmas my true love gave to me,"); thirdDay(); System.out.println(); System.out.println("On the fourth day of Christmas my true love gave to me,"); fourthDay(); System.out.println(); System.out.println("On the fifth day of Christmas my true love gave to me,"); fifthDay(); System.out.println(); System.out.println("On the sixth day of Christmas my true love gave to me,"); sixthDay(); System.out.println(); System.out.println("On the seventh day of Christmas my true love gave to me,"); seventhDay(); System.out.println(); System.out.println("On the eighth day of Christmas my true love gave to me,"); eighthDay(); System.out.println(); System.out.println("On the ninth day of Christmas my true love gave to me,"); ninthDay(); System.out.println(); System.out.println("On the tenth day of Christmas my true love gave to me,"); tenthDay(); System.out.println(); System.out.println("On the eleventh day of Christmas my true love gave to me,"); eleventhDay(); System.out.println(); System.out.println("On the twelfth day of Christmas my true love gave to me,"); twelfthDay(); } public static void firstDay (){ System.out.println("On the first day of Christmas my true love gave to me,"); System.out.println("A Partridge in a Pear Tree"); } public static void secondDay (){ System.out.println("Two Turtle Doves and,"); System.out.println("A Partridge in a Pear Tree"); } public static void thirdDay (){ System.out.println("Three French Hens"); secondDay(); } public static void fourthDay (){ System.out.println("Four colly birds"); thirdDay(); } public static void fifthDay (){ System.out.println("Five gold rings"); fourthDay(); } public static void sixthDay (){ System.out.println("Six geese a-laying"); fifthDay(); } public static void seventhDay (){ System.out.println("Seven swans a-swimming"); sixthDay(); } public static void eighthDay (){ System.out.println("Eight maids a-milking"); seventhDay(); } public static void ninthDay (){ System.out.println("Nine ladies dancing"); eighthDay(); } public static void tenthDay (){ System.out.println("Ten lords a-leaping"); ninthDay(); } public static void eleventhDay (){ System.out.println("Eleven pipers piping"); tenthDay(); } public static void twelfthDay (){ System.out.println("Twelve drummers drumming"); eleventhDay(); } }
run
|
edit
|
history
|
help
0
상속1
Engine Java
PE #8
Add Two Numbers saved in linked lists
Piramid
Random number
Basic_Structure
test1
exp 1
Main