Posts

Showing posts from November, 2013

Konversi Desimal ke Biner Menggunakan Stack - Java

Image
Buatlah New Projrct dengan cara klik file -> new projrct , pilih java application. beri nama project kemudian masukan kode dibawa ini: /*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package biner; import java.util.Scanner; /**  *  * @author Moch. Afif  */ public class Biner {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         // TODO code application logic here         System.out.println("Program konversi ke biner dari desimal");         Scanner msk =new Scanner(System.in);         System.out.print("Masukan Nilai Desimal :");         int bil = msk.nextInt();         tumpukan bn=new tumpukan(10);         int n=bil;   ...

Pascal - Menghitung Rata-Rata dan Resultan

Image
Referensi dan Tugas sebelum UTS Diketahui: data vx1 sampai vx6 dengan data secara berturut-turut 5,10,2,6,15,25 data vy1 sampai vy6 dengan data secara berturut-turut 2,6,8,12,30,36 Cari Vx dan Vy rata2 dan Resultanya tulis dalam program pascal program data; uses wincrt; var vx,vy,r1,r2:real; begin vx:=(5+10+2+6+15+25)/6; vy:=(2+6+8+12+30+36)/6; r1:=sqr(vx)+sqr(vy); r2:=sqrt(r1); writeln('Vx Rata2       :',vx:0:2); writeln('Vy Rata2       :',vy:0:2); writeln('Resultanya     :',r2:0:2); end.

Java - Balik kata dan Polindrom dengan Stack

Image
Untuk Main Programnya /*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package stack; /**  *  * @author Moch. Afif  */ public class Stack {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         // TODO code application logic here         tumpuk st = new tumpuk(5);            st.push("k");            st.baca();           st.push("a");           st.baca();           st.push("k");           st.baca();           st.push("e");           st.baca();           st.push("k");     ...

Java - Coding Insertion Sort

Image
/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package tgsinsrtsort; /**  *  * @author Moch. Afif  */ public class Tgsinsrtsort {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         // TODO code application logic here         int A[]={89,56,78,32,22,434,78};         int b=A.length;         int i,j,k,l;         int tmp;         System.out.print("Sebelum Insertion Sort : ");         for(i=0;i<b;i++){             System.out.print(...

Java - Coding Selection Sort

Image
 * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package tgsslctsort; /**  *  * @author Moch. Afif  */ public class Tgsslctsort {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         // TODO code application logic here         int A[]={90,87,34,56,76,89};        int b=A.length;        int i,j,k,l;        int tmp;        System.out.print("Sebelum Selection Sort : ");         for(i=0;i<b;i++){             System.out.print(A[i]+" ");    ...

Java - Coding Buble Sort

Image
/*  * To change this template, choose Tools | Templates  * and open the template in the editor.  */ package tgsbbsort; /**  *  * @author Moch. Afif  */ public class Tgsbbsort {     /**      * @param args the command line arguments      */     public static void main(String[] args) {         // TODO code application logic here         int A[] = {34,65,43,56,87,98,76};         int b=A.length;         int i,j,k,l;         int tmp;         System.out.print("Sebelum Bubble Sort : ");         for(i=0;i<b;i++){             System.out.print(A[i]+" "...

All Of Doc Extra

Image
Kumpulan Materi dan Tugas Judul Link Download Keterangan Tanggal Maba Download Cover 02 Nov '13 Debat Download Makalah dan Pasal 30 Mei '13