Home » C Program For Law Of Sine Problems

C Program For Law Of Sine Problems

With the law of sine, you can find any unknown angle of a given triangle or the length of a particular side of a triangle or the length of a particular side of a triangle. This is a fundamental concept of trigonometry.

We used Dev-C++ to compile the program, but you may use any other standard C compiler. This program make use of math header – math.h  especially, two trig functions – sin () function and asin () function at lot. So if you are choosing a different compiler then use the correct math header file.

Before you try the example, learn following C programming concepts. You can skip it if already know it well.

Problem Definition

The law of sine is given below. The triangle has three sides a, \hspace{1ex} b, and c; It also has three angles – \angle A, \hspace{1ex} \angle B and \angle C.

Figure1: Law of Sine for a Triangle
Figure1: Law of Sine for a Triangle

In general, there are two cases for problems involving the law of sine.

Case 1: When the length of two sides are given and the angle opposite to one of the sides with length is given.

Figure2: Law of sine for two sides and 1 angle
Figure2: Law of sine for two sides and 1 angle

When the length of two side – A and B are given and the angle opposite to side \hspace{1ex} A is given. Then using law of sine

X \hspace{1ex} = \hspace{1ex} sin \hspace{1ex} A/a
sin \hspace{1ex} B/b \hspace{1ex} = \hspace{1ex} X
sin \hspace{1ex} B \hspace{1ex} =\hspace{1ex}  X \hspace{1ex}\ast \hspace{1ex}b
Angle \hspace{1ex} B \hspace{1ex} = \hspace{1ex} arcsin ( X \ast b)

This the way to find the value of sin B and then using arcsin to find the \angle B.

(adsbygoogle = window.adsbygoogle || []).push({}); </script

Please support us by disabling your adblocker or whitelist this site from your adblocker. Thanks!

turn of adblocker imag

(adsbygoogle = window.adsbygoogle || []).push({});