Please format your code before posting! At least it contains good indentations.
For example somebody(pssst...) posted this code:...it should be look like this: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); }Which is more readable?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); }
Please format your code before posting, because it make us easier to analyst your code and its algorithm.