9.c final, see triples.c for primitive triple finding program in c