With no good reason I know..........the loop in here turn infinite
can anybody know why
Code:#include <stdio.h> int main() { int x,ul,ll,j=1; printf("Please enter your desired number you want its divisible numbers\n"); scanf("%i",&x); printf("Please enter the lower limit you desire\n"); scanf("%i",&ll); //ALERT: getchar(); --> its only with characters! printf("Please enter the upper limit you desire\n"); scanf("%i",&ul); for (j >= ll ; j <= ul; j--) { if (j < x) { if (j % x == 0) { printf("\n%i", x); j++; } } else { if ( j == x) { j = 0; printf("\t\t"); } } } return (0); }



LinkBack URL
About LinkBacks



