#include <stdio.h>int main(void) {    int a[100],n,sum,i,j,b[100];    scanf(%d,&n);    for(i=0;i<n;i++)    {        scanf(%d,&a[i]);        b[i]=0;        for(j=0;j<i;j++)        {            if(a[i]>a[j]) b[i]++;            else b[j]++;        }    }    for(i=0;i<n;i++)        printf(%d ,b[i]);    return 0;}Here I'm trying to find how many numbers there are below a particular number.This program takes the number of elements and the numbers themselves as the input. For example, n = 5 and the 5 numbers 2 8 6 1 5. This would give the output 1 4 3 0 2 since the number 2 is greater than 1, the number 8 is greater than 2, 6, 1 and 5, and so on.
Find how many numbers in an array are less than each number in the array
c