prime calculator in C