Updated, added a checkint function and dealt with divide by 0 exception. Needs to be compiled.