Suppose you know the lengths and the angle between two adjac
     Suppose you know the lengths and the angle between two adjacent sides of a triangle, as shown in the drawing below. You can find the area of the triangle using the following relationship:  tAREA = 1/2 * a * b * sin(x)  Open the script editor by using the drop down menu, Applications and select Scinotes.  Write a script file to compute the area of the triangle using the equation  tAREA = 1/2 * a * b * sin(x)  and save it in an .sce file called TriangleArea.  The values a, b and x should be loaded using the input command. Remember trig functions in SCILAB expect the angles to be in units of radians. Use the printf command to display the input variables, their value and units and display the output variable, tAREA giving its value and units.  Use the following values to test your results: a = 5 ft, b = 6 ft, and x = 23 degree.  a = 12 ft, b = 2 ft, and x = 78 degree.  Run your script file, and test your results. What would happen if you used an angle greater than 180 degree? When you tried it, does it make sense? Is there a way to adjust your script with this in mind? 
  
  Solution
Here I am giving script file in python language, you can adjust it any language according to your preference.
a = input(\"Enter the length of side1\")
b = input(\"Enter the length of side2\")
x = input(\"Enter the angle between sides\")
tAREA = 0
tAREA = (1/2)*a*b*math.sin(x)
print tAREA+\"deg\"
Now, If Someone has used angle above 180 deg. then it would show negative area that is not possible.
So, we can implement it by using conditionals. Let see again --------
a = input(\"Enter the length of side1\")
b = input(\"Enter the length of side2\")
x = input(\"Enter the angle in degree between sides\")
tAREA = 0
if x > 180:
tAREA = {- (1/2)*a*b*math.sin(x)}
else:
tAREA = (1/2)*a*b*math.sin(x)
print tAREA

