Now, I wanna tell you how to find the value of triangle side. Hmm.. Maybe I'm not good in math, but I always try to find it as long as I can. So, if you find any wrong in my syntax, please put your comment.
Hehe.. Here is the syntax... Lets check it out!
package chacam.main;
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);
}
}
0 komentar:
Posting Komentar