View Code of Problem 76

# include<stdio.h>
int main(void)
{
    int a[10],i,j;
    for(i=0;i<9;++i)
    {
        scanf("%d",&a[i]);
    }
    int t;
    scanf("%d",&t);
    for(i=8;i>=0;--i)
    {
        if(a[i]<t)
        {
            for(j=8;j>i;++j)
            {
                a[j+1] = a[j];
            }
        }
        a[i+1] = t;
    }
    return 0;
}

Double click to view unformatted code.


Back to problem 76