I have made a program to accept integers only however if i put a 25e in it it still works how do i fix it?
Code:char line[MAXLINE]; int error, n; do { printf("Input a positive integer: "); fgets(line, MAXLINE, stdin); error = sscanf(line, "%d", &n) != 1 || n <= 0; if(error) printf("\nERROR: Do it again. \n"); }while (error);