Rabu, 30 Maret 2011

Luas Segitiga

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

package Tugas;

import java.util.Scanner;
public class Segitiga
{
    public static void main (String[] args)
    {
        Scanner input=new Scanner (System.in);
        double a, t, luas;
        System.out.print("Alas Segitiga="); a= input.nextDouble();
        System.out.print("Tinggi Segitiga="); t=input.nextDouble();
        luas=0.5*a*t;
        System.out.print("Luas Segitiga=" +luas);
    }

}

Tidak ada komentar:

Posting Komentar