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.
|
Ambitious contributor
|
![]() |
| 23Nov2009,08:54 | #2 |
|
How much have you progressed in writing this code?
|
|
Go4Expert Member
|
|
| 26Feb2010,11:46 | #3 |
|
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++;
}
}
|
|
Light Poster
|
|
| 26Feb2010,12:36 | #4 |
|
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 |

