Program Checks correctly for the composite or prime