1#include<stdio.h>23intmain(void)4{5int a[10]={3,1,4,7,5,9,2,6,10,8};6for(int i =0; i <3; i++)7for(int j =10;--j > i;)8if(a[j-1]> a[j]){9int t = a[j-1]; a[j-1]= a[j]; a[j]= t;10}11for(int i =3; i <10; i++) a[i]=0;12for(int i =0; i <10; i++)printf(" %d", a[i]);13putchar('\n');14}