Week 1: Thursday ---------------- Q1. (40) Write a program to input the edges of a triangle and print whether the triangle is equilateral, isosceles or scalene. Also print the area of the triangle. The formula to find out the area of a triangle is sqrt(s*(s-a)*(s-b)*(s-c)) where s is half the sum of the three sides. For the above program, you will require to use square roots. Insert the following line together with the rest of the program as shown below. #include #include int main() { ... ... } Now you can calculate square root as follows: double x = 1234321; double result = sqrt(x); You have to compile your program using gcc -lm For example, if your file is x.c, you have to run gcc -lm x.c and then run a.out Q2. (60) With respect to a line, a point can be either above or below and left or right which together generates the following possibilities: left-above right-above right-below left-below Write a program to input two points (a,b) and (c,d). Find the location of the origin (0,0) with respect to the line joining the two points. Assume that the line will not be vertical or horizontal and the line will not pass through the origin. Print the correct position as one of the above 4 possibilities. While printing, use shorthands 'l' for left, 'r' for right, 'a' for above and 'b' for below. For example, if the points are (0,1) and (1,0), the origin is left-below and you should print l b.