#include using namespace std; // A function implementing Counter sort. void CounterSort(int a[], int n, int r, int lower) { int i, j = 0, counter[r] = {0}; // Counting the number occurrence of each element. for(i=0; i 0) goto flag; i++; } } int main() { int n, i, range, ulimit, llimit; cout<<"\nEnter the number of data element to be sorted: "; cin>>n; cout<<"\nEnter the lower and upper limit of the data to be entered: "; cin>>llimit>>ulimit; // Range of the input data. range = ulimit-llimit+1; int arr[n]; for(i = 0; i < n; i++) { cout<<"Enter element "<>arr[i]; } CounterSort(arr, n, range, llimit); // Printing the sorted data. cout<<"\nSorted Data "; for (i = 0; i < n; i++) cout<<"->"<