Algorithm v1

uploaded the work we have done so far on the algorithm
someone who has actually used C before should make sure that the syntax
is correct