Sabtu, 15 Oktober 2011

Balik lagi

hoahhhh... lama gak nge-blog.
banyak baget tugas yang dead-line, and sekarang dapet tugas karya ilmiah dari dosen bahasa. (puyeng)
Belum lagi harus nyari 7 sumber dari buku + 3 narasumber yg harus diwawancarai.

She said : harus dikumpulin minggu depan
(wah,) tambah stress deh...

judulnya "Peran Bahasa Melayu Dalam Bahasa Indonesia"
:(

Rata-rata.java


 /*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author COMPAQ
 */
public class Rata_rata {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         float Rata_Rata, a=81,b=70,c=95,d=60,e=88;
        // float merupakan tipe variabel yang digunakan untuk bilangan berkoma
        System.out.println("No 1(a) = " + a);
        System.out.println("No 2(b) = " + b);
        System.out.println("No 3(c) = " + c);
        System.out.println("No 4(d) = " + d);
        System.out.println("No 5(e) = " + e);


      
        Rata_Rata = ((a+b+c+d+e)/5);
        // 5 adalah perintah untuk membagi 5
        // 5 merupakan banyaknya bilangan
        System.out.println("Rumus = (a+b+c+d+e)/5");
        System.out.println("Rata Ratanya =" + Rata_Rata);
 }

}


run:
No 1(a) = 81.0
No 2(b) = 70.0
No 3(c) = 95.0
No 4(d) = 60.0
No 5(e) = 88.0
Rumus = (a+b+c+d+e)/5
Rata Ratanya =78.8
BUILD SUCCESSFUL (total time: 0 seconds)


(Matematika.java)

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author COMPAQ
 */
public class Matematika {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
         int bil_a, bil_b, hasil;
        bil_a = 68;
        bil_b = 112;
        hasil = bil_a + bil_b;
        System.out.println (hasil);
    }

}


run:
180
BUILD SUCCESSFUL (total time: 0 seconds)