Print reverse counting between an interval
C program to print the reverse counting between an interval.
Program
#include<stdio.h>
#include<conio.h>
void main()
{
int i, start, end;
printf("Enter starting and ending number\t:");
scanf("%d%d",&start, &end);
printf("\nReverse counting\n");
for(i=end;i>=start;i--)
{
printf("%d\n",i);
}
getch();
}
Output
Enter starting and ending number :5
14
Reverse counting
14
13
12
11
10
9
8
7
6
5