Wednesday, November 24, 2010

Program to find area of a triangle whose two sides and an angle between them is given

implicit double precision(a-h,o-z)
write(*,*) “please provide the two sides a and b and the angle”
read(*,*) A,B,theta
area=A*B*SIN(theta)
side=DSQRT(A*A+B*B-2*A*B*COS(theta))
write(*,*) ‘area=’,area,’side=’,side
stop
END

No comments:

Post a Comment