View Code of Problem 76

#include <stdio.h>

int main(){
    int i;
    int a[10];
    for(i=0;i<9;i++)
        scanf("%d",&a[i]);
    int b;
    scanf("%d",&b);
    i=8;
    while(a[i]>b){
        a[i+1] = a[i];
        i--;
    }
    a[++i] = b;
    for(i=0;i<10;++i){
        printf("%d\n",a[i]);
    }
    
    return 0;
}

Double click to view unformatted code.


Back to problem 76