Dear Friend,

You can use the following coding.

Code:
#include<stdio.h>
main()
{
        int a,b;
        printf("Enter the first number\n");
        scanf("%d",&a);
        printf("Enter the second number\n");
        scanf("%d",&b);
        if(b<=a)
        {
                printf("You can't get the range\nThe first number should be less than second number\n");
        }
        while(a<=b)
        {
                printf("%d\t",a);
                a++;
        }
}