From 98b6f16f6e133ee8fab51fd07b4c6c782c0a3bfe Mon Sep 17 00:00:00 2001 From: nuzhamusyafira Date: Tue, 14 Aug 2018 10:38:03 +0700 Subject: [PATCH 1/3] NZH java --- Calendar.class | Bin 0 -> 937 bytes Calendar.java | 20 ++++++++++++++++++++ CalendarDay.class | Bin 0 -> 855 bytes CalendarDay.java | 21 +++++++++++++++++++++ HelloWorld.class | Bin 0 -> 654 bytes HelloWorld.java | 20 ++++++++++++++++++++ 6 files changed, 61 insertions(+) create mode 100644 Calendar.class create mode 100644 Calendar.java create mode 100644 CalendarDay.class create mode 100644 CalendarDay.java create mode 100644 HelloWorld.class create mode 100644 HelloWorld.java diff --git a/Calendar.class b/Calendar.class new file mode 100644 index 0000000000000000000000000000000000000000..2d6b6f55318b3bb2785263d58865f0e90c1539d6 GIT binary patch literal 937 zcmZva+e;Kt9LK+BFV1lg5)DUPc>3XP5_4F>ThQ1}a;ID5xd z#`Izo_W5`F%KrTvQ~s?~plzqm#qx@-FnjxsYt{>O)!Z-ZDrjhK1-kOP%x3n#n@SrE z7RLJh$OLSicm2W*4l?98wOV82oi@+^Zg#@fy|Biwuxp|vGT3Bs!=Pi)Gbk-q3^rT5WiVy2XfSPY(qP8osKKno zL4z$8a|T;2b{lN7m^Ro>G_A*M>yv0B$KfD>86;8SFz#^YLL%fq9w3FsNaHCRevT|& jqXnC2#TUkXM>~FS&IfoyCt7}CMx_2(4(HTk6CL~m?`6S6 literal 0 HcmV?d00001 diff --git a/Calendar.java b/Calendar.java new file mode 100644 index 0000000..e433d4a --- /dev/null +++ b/Calendar.java @@ -0,0 +1,20 @@ +public class Calendar{ + public static void main(String[] args){ + int month= Integer.parseInt(args[0]); + switch(month){ + case 1: System.out.println("Januari"); break; + case 2: System.out.println("Februari"); break; + case 3: System.out.println("Maret"); break; + case 4: System.out.println("April"); break; + case 5: System.out.println("Mei"); break; + case 6: System.out.println("Juni"); break; + case 7: System.out.println("Juli"); break; + case 8: System.out.println("Agustus"); break; + case 9: System.out.println("September"); break; + case 10: System.out.println("Oktober"); break; + case 11: System.out.println("November"); break; + case 12: System.out.println("Desember"); break; + default: System.out.println("Out of box!"); + } + } +} \ No newline at end of file diff --git a/CalendarDay.class b/CalendarDay.class new file mode 100644 index 0000000000000000000000000000000000000000..d54dd38848355c846489585a873efdaf06f6200f GIT binary patch literal 855 zcmZuuOKTHR7(F+ynM~3)eI!2GYT`4E#b~=wY3ssDv5?wAqzdBVCK*|Ob+ z^e@W(NmZUk8UqFnr*Q;F4IE43IEn(1+0zE5(kS5sgPC*6oK^HGfz)a*$a^>QHSbP= z(SIG;U;ol-ZNshy0>heGb_2U<`vPW1`dyo$K(@Hc8p}I6Rr}q*Zc`Yqrwab%J6?H> zI|tm{mhCx#(QwXATEOV2q!tC+b&_50B&y}MlIr~P@$`gx-fB%Dm|pUk16nTDzHg$-!SVlE5A{{AFTa}5o}?M W7RX}gH!4C{8A~67B9DgS#{L4`fvT|p literal 0 HcmV?d00001 diff --git a/CalendarDay.java b/CalendarDay.java new file mode 100644 index 0000000..7f73015 --- /dev/null +++ b/CalendarDay.java @@ -0,0 +1,21 @@ +public class CalendarDay{ + public static void main(String[] args){ + int year=Integer.parseInt(args[0]); + int month=Integer.parseInt(args[1]); + switch(month){ + case 1: System.out.println("31"); break; + case 2: if(year%4==0) System.out.println("29"); else System.out.println("28"); break; + case 3: System.out.println("31"); break; + case 4: System.out.println("30"); break; + case 5: System.out.println("31"); break; + case 6: System.out.println("30"); break; + case 7: System.out.println("31"); break; + case 8: System.out.println("31"); break; + case 9: System.out.println("30"); break; + case 10: System.out.println("31"); break; + case 11: System.out.println("30"); break; + case 12: System.out.println("31"); break; + default: System.out.println("Out of box!"); + } + } +} \ No newline at end of file diff --git a/HelloWorld.class b/HelloWorld.class new file mode 100644 index 0000000000000000000000000000000000000000..6237280fa1846ab62aa77894f09346a9c6feceef GIT binary patch literal 654 zcmZuvT~8BH5IxhcyWKAILIsfpw20DHrAd8*hJYxMfI_kaA9%VgH_gI!w^_C({vQ&b z?cjlg*GjnEkZ~y)N1K=%Q+bChi#w;EeF^4A>=54rGu&`)h z$-+|$&jhLh%Y;JP5B+45kge5E2)Ui;OcTlneyBeW`yCx0t4_d3uCM%%Fk3r4I9Fd) zGf-i#=_Ror_BIT0!b?>5;*%PT@@+2~#$CPZ8*=%h4ua@Q6bEN(hV8(?gurtLD|jLB z(!nZf1lks;J80k)$M4v7*xs{!AlTy)1UZ&)*g4nTgfKOR_QFK>bWE@YD!$ZwCCt}d_QU)@r(&is#Sl3P)YmThY4a}k^)}PgN;s5h507t$$-rC zd`|Lhkv*}`H-3VCaKOvrvyg&>A|$3bHmO%k&9FaiWLv+GX}j|13X|8!PUmir|Bg*p z?v8*$3cPV;djyCSSa4-)1Xw9hGVCIUrgJ9kyq3z$LLkQ?^Zfe=EWtvZ2WaxUbw;;X a&pzw&P{A}aZRG!Aj--@=wN}zvkNyLfJb-xs literal 0 HcmV?d00001 diff --git a/HelloWorld.java b/HelloWorld.java new file mode 100644 index 0000000..4d74623 --- /dev/null +++ b/HelloWorld.java @@ -0,0 +1,20 @@ +public class HelloWorld{ + public static void main(String[] args){ + int score= Integer.parseInt(args[0]); + if(score>80){ + System.out.println("A"); + } + else if(score>70){ + System.out.println("B"); + } + else if(score>60){ + System.out.println("C"); + } + else if(score>50){ + System.out.println("D"); + } + else{ + System.out.println("E"); + } + } +} \ No newline at end of file From 69b4870ea5e83ce1412bef251217324bca0890bb Mon Sep 17 00:00:00 2001 From: nuzhamusyafira Date: Tue, 14 Aug 2018 11:04:56 +0700 Subject: [PATCH 2/3] NZH javaFactorials --- FacRecursive.class | Bin 0 -> 588 bytes FacRecursive.java | 10 ++++++++++ Factorial.class | Bin 0 -> 557 bytes Factorial.java | 14 ++++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 FacRecursive.class create mode 100644 FacRecursive.java create mode 100644 Factorial.class create mode 100644 Factorial.java diff --git a/FacRecursive.class b/FacRecursive.class new file mode 100644 index 0000000000000000000000000000000000000000..c6fa896309c1f1c69d6f21b7cef0386a609ab5d3 GIT binary patch literal 588 zcmZvZ%TB^T6o&tS!aywuDqf2BThN6h7*`rMCL|@x=bfLtB z58y)?&r~Ct*h%Jc@_+xi^!?-Y4ZtooO>j(_m_i|qY0Q{NV%EeQY>pzwJVWw8c`7($ zh?ll58H}TDQ!1) return n*(Recursive(n-1)); + else return n; + } +} \ No newline at end of file diff --git a/Factorial.class b/Factorial.class new file mode 100644 index 0000000000000000000000000000000000000000..46cd1a7af6e94ac8fe7d338489cbc0827df220b5 GIT binary patch literal 557 zcmZuu%TB^T6g`&~3Z*Ehpa@mb4PqjRE)h2-CM5VsFm7B8IKe8kq!ttReuY~Xu63ct zg&*Lr_y;c3JJm=`oJsC$&N+AP%MUmyjzTHBZHbsP=^0t+oQ+al17|Otk{h zIolC~AH3P}hJHtGJBmEEEjoecJEFI$$QBI54dgA%qF|tC!N#0{c?%0D5fZ;>LVDC} zuYD>z0U Date: Tue, 14 Aug 2018 11:43:29 +0700 Subject: [PATCH 3/3] NZH bubble --- Bubble.class | Bin 0 -> 954 bytes Bubble.java | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Bubble.class create mode 100644 Bubble.java diff --git a/Bubble.class b/Bubble.class new file mode 100644 index 0000000000000000000000000000000000000000..763a610d624b860cd77b9066e5b66af5eefdfa0a GIT binary patch literal 954 zcmaJ=QBTuQ6#mZIu3J}NY;03T6%=rrV^h?rfe?j+1Otv_#%M^4-PSCHty@NC;ydxl zNBslD#AkgNM$LYJ5B>vxgYOGL&+SZ5L7VoRd%kw zt=ghKwA?8(QBD-=7(rM?M#p7jRm|zgAx}vBO}yN(>s70*;|i`4Xi_ZZb?*7PiW@o# zxJiJHTf+MX{Dkl^OR>CdRa}B^YmG2^jITMaRkPZJK+A0JS{xE$sZ;vmvft=R&v#v` z!INrsM8P26Zss?62riGpG8+pl#B8-Jr%ISet))+J{%VQy=1zOzfARxvb1-hgSn4D( zGe*4*{}e<}T0-7G8srbBdi!+;QyAitBrYHL1R%_Ilp}*Z&lyVQ0Q8O*ga})|2NHsa zVvN_EO5;!%2VQ4-i^qk?X=AQM(9q5$rV!0{{9%h?hZ*ViS(D;CbaEA}pDoarray[j+1]){ + int temp=array[j]; + array[j]=array[j+1]; + array[j+1]=temp; + } + } + } + for(int i=0;i