hi guys, can anyone help me in solving this problem as i am new to c programming , write a program to find the range for the set of numbers using while loop.

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++; } }

Did u mean u'll give a sequence of number like 1,2,3,6,7,23, etc and the code need to find the range of these numbers as 1 to 23 , or U'll give a couple of number the code needs to print the numbers in between them ? Please solve my confusion