C/C++

Valid Triangle

Submitted by ashine80 on
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

Dictionary using File Processing - C Program

Submitted by davidwachira on
A dictionary written in C that retrieves words from a text file. This is a practical exercise in file processing using text files. If a word that has been searched is not found in the dictionary, it is added at the end. The words in the dictionary are not in alphabetical order. Rather, they are randomly arranged. This is version 2 of a previous Dictionary. Enjoy #include /* C Standard Input and

PASCALSTRIANGLE

Submitted by ashine80 on
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.

Collinear Points

Submitted by ashine80 on
This program will print whether the three points of Cartesian Coordinate System (x,y) is collinear or not. I formed a 3x3 matrix and then calculated the determinant. If determinant is zero these three points are collinear otherwise not.