souce code jajar genjang.java

Shared by: Agito_Shinning
-
Stats
views:
91
posted:
6/11/2012
language:
pages:
2
Document Sample
scope of work template
							/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package menghitungluaskeliling;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 *
 * @author TAXI
 */
public class Main {

    public Main() throws IOException{

        int a1;
        int a2;
        int b1;
        int b2;
        int t;
        int k;
        float l;
        BufferedReader input = new BufferedReader(new
InputStreamReader(System.in));

        System.out.println("Nilai alas atas : ");
        a1 = Integer.parseInt(input.readLine());
        System.out.println("Nilai alas bawah : ");
        a2 = Integer.parseInt(input.readLine());
        System.out.println("Nilai sisi kanan : ");
        b1 = Integer.parseInt(input.readLine());
        System.out.println("Nilai sisi kiri : ");
        b2 = Integer.parseInt(input.readLine());
        System.out.println("Nilai tinggi : ");
        t = Integer.parseInt(input.readLine());
        k = (int) (a1+a2+b1+b2);
        System.out.print("keliling jajar genjang adalah = ");
        System.out.println(k);
        l = (float) (((a1+a2)*0.5)*t);
        System.out.print("luas jajar genjang tersebut adalah = ");
        System.out.println(l);
    }


    /**
     * @param args the command line arguments
     */
    public static void main(String[] args)throws IOException {
        // TODO code application logic here
        Main m = new Main();
    }

}

						
Related docs
Other docs by Agito_Shinning
usecase diagram counter hp
Views: 85  |  Downloads: 2
Makalah-Zat-Pewarna
Views: 2497  |  Downloads: 82
Goosebumps - Monster Blood
Views: 51  |  Downloads: 1
Goosebumps - Welcome to Dead House
Views: 61  |  Downloads: 1
Doa Wudhu Lengkap
Views: 2510  |  Downloads: 42
Goosebumps - Stay Out of the Basement
Views: 220  |  Downloads: 0
PERAN ILMU BIOKIMIA DALAM BIDANG FARMASI
Views: 2471  |  Downloads: 86
Perancangan sistem informasi berbasis komputer
Views: 116  |  Downloads: 6
souce code jajar genjang.java
Views: 101  |  Downloads: 1