Created
April 5, 2014 18:21
-
-
Save AsafHaas/9995878 to your computer and use it in GitHub Desktop.
אחד מי יודע
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.asaf.passover.songs; | |
public class OneWhoKnows | |
{ | |
public static void printUnderLine(int dashes) | |
{ | |
for (int i = 1; i <= dashes; i++) | |
System.out.print("-"); | |
System.out.println(); | |
} | |
public static void singOneWhoKnows(String[] things, String[] numbers, int n) | |
{ | |
if (n >= things.length) | |
return; | |
String num = n == 2 ? "שניים" : numbers[n]; | |
System.out.println(num + " מי יודע, " + num + " אני יודע"); | |
System.out.println(numbers[n] + " " + things[n]); | |
for (int i = n - 1; i >= 1; i--) | |
System.out.println(numbers[i] + " " + things[i]); | |
System.out.println("אלוהנו אלוהנו אלוהנו אלוהנו, שבשמיים, ובארץ."); | |
printUnderLine(30); | |
singOneWhoKnows(things, numbers, n + 1); | |
} | |
public static void main(String[] args) | |
{ | |
String[] things = { "", "אלוהנו", "לוחות-הברית", "אבות", "אמהות", "חומשי-תורה", "סדרי-משנה", "ימי-שבתא", "ימי-מילה", "ירחי-לידה", | |
"דיבריא", "כוכביא", "שבטיא", "מידיא" }; | |
String[] numbers = { "", "אחד", "שני", "שלושה", "ארבע", "חמישה", "ששה", "שבעה", "שמונה", "תשעה", "עשרה", "אחד-עשר", | |
"שנים-עשר", "שלושה-עשר" }; | |
singOneWhoKnows(things, numbers, 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment