Mathematical

Valid Triangle

This programme will check whether the 3 sides a,b,c of given length will form a Triangle or not ... First we will calculate s=(a+b+c)/2 where a,b,c are the length of given three lines.. Then s(s-a)(s-b)(s-c) then the square root of this . From this we will find Each Angle of supposed triangle. Then we will find a/Sin(A) ,b/sin(B) and c/sin(C) If all are equal then "The 3 lines of lenth a,b,and c

PASCALSTRIANGLE

This will print the Pascals Triangle up to 'n' lines. I created the Matrix of nXn Matrix. Then initilized all the element to zero. Then Calculated the Combination of i,j using the formula: C(n,r)=n!/(r!*(n-r)!) Before that I calculated the Factorial of a number by using a recursive Function.