Rabu, 28 Agustus 2013

Pembelajaran Java 1-Menghitung Keliling Persegi Panjang

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

package Class;

/**
 *
 * @author Trisandiyana
 */
public class AplikasiPertama {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here


        double panjang, lebar, keliling;

        panjang = 7;
        lebar = 5;
        keliling = 2*(panjang+lebar);
        System.out.println("Keliling adalah : "+keliling);
    }

}

Tidak ada komentar:

Posting Komentar