-
-
Save avielg/9995351 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
public class singHadGadiaSong { | |
public static void singHadGadia(String[] characters, String[] actions, int n) | |
{ | |
if (n >= characters.length) | |
return; | |
System.out.println("ואתא " + characters[n]); | |
for (int i = n - 1; i >= 0; i--) { | |
String prefix = (i == n - 1 ? "ו" : "ד"); | |
System.out.println(prefix + actions[i] + " ל" + characters[i]); | |
} | |
String had = ", חד גדיא"; | |
System.out.println("דזבין אבא בתרי זוזי" + had + had + "."); | |
printUnderline(30); | |
singHadGadia(characters, actions, n + 1); | |
} | |
public static void printUnderline(int dashes) | |
{ | |
for (int i = 0; i <= dashes; i++ { | |
System.out.print("-"); | |
} | |
System.out.println(); | |
} | |
public static void main(String[] args) | |
{ | |
String[] characters = { "גדיא", "שונרא", "כלבא", "חוטרא", "נורא", "מיא", | |
"תורא", "שוחט", "מלאך-המוות", "הקבה" }; | |
String[] actions = {"אכלא", "נשך", "הכה", "שרף", "כבה", "שתה", "שחט", "שחט", "שחט"}; | |
System.out.println("חד גדיא, חד גדיא"); | |
printUnderline(30); | |
singHadGadia(characters, actions, 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment