Senin, 03 Juni 2013

What is the triangle's Formula by Using Java?





public class SisiSegitigaSembarang
{
    public static void main(String[] args)
    {
        int a,b,c;
        double degreeA, degreeB, degreeC;

        a = 8;

        degreeA = 65;
        degreeB = 95;
        degreeC = 20;

        b = (int) ((a) * Math.sin(degreeB) / (Math.sin(degreeA)));

        System.out.println("Nilai sisi b = "+b);

        c = (int) ((b)*Math.sin(degreeC)/(Math.sin(degreeB)));

        System.out.println("Nilai sisi c = "+c);

    }
}

Tidak ada komentar:

Posting Komentar