@@ -0,0 +1,472 @@
+package logic1;%0A%0Apublic class TeaPartyTest %7B%0A%0A%09public static void main(String%5B%5D args) %7B%0A%0A%09%09TeaPartyTest test = new TeaPartyTest();%0A%09%09System.out.println(test.teaParty(6, 8));%0A%09%09System.out.println(test.teaParty(3, 8));%0A%09%09System.out.println(test.teaParty(20, 6));%0A%09%7D%0A%0A%09public int teaParty(int tea, int candy) %7B%0A%09%09if (tea %3C 5 %7C%7C candy %3C 5)%0A%09%09%09return 0;%0A%0A%09%09if (tea %3E candy && candy * 2 %3C= tea)%0A%09%09%09return 2;%0A%09%09if (candy %3E tea && tea * 2 %3C= candy)%0A%09%09%09return 2;%0A%0A%09%09return 1;%0A%09%7D%0A%7D%0A

Add TeaPartyTest