Posts

Showing posts from October, 2015

Java - Sorting Array dengan Kriteria

Image
Menggunakan java dalam penulisan senuah program yang akan mengurutkan angka yang diinput dengan kriteria data tidak lebih dari 50, program akan berhenti menerima inputan ketika diinputkan angka 0 dan program akan mengurutkan angka dari terkecil ke terbesar. Berikut Link download Java Packagenya (Compiler Netbean). Download Sorting Array Berikut Kodenya: /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package inputberulang ; import java.util.ArrayList ; import java.util.Collections ; import java.util.Scanner ; /** * * @author Moch.Afif */ public class Inputberulang { /** * @param args the command line arguments */ public static void main ( String [] args ) { // TODO code application logic here Scanner in = new Scanner ( System . in); int b = 1 ; System . out . pri

Java - Angka Terbilang

Image
Berikut Codenya Untuk pertanyaan silakan hubungi mafifannisa@gmail.com atau kunjungi afifannisa.ddns.net Untuk Download Klik Link dibawah ini dan buka dengan Netbean Download Source Code Model Sedikit Ribet : /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ngka.terbilang ; import java.util.Scanner ; /** * * @author Moch.Afif */ public class NgkaTerbilang { String [] angka = { "" , "Satu" , "Dua" , "Tiga" , "Empat" , "Lima" , "Enam" , "Tujuh" , "Delapan" , "Sembilan" , "Sepuluh" , "Sebelas" }; public String kata ( double ank ){ if (ank < 1 ){ return "Nol" ; } if (ank < 12 ) { return angka[( int )a