#include
#include
#include
int main (void)
{
srand(time(0));
int a[10],n=10,i,j,k,temp;
for (i=0;i<10;i++)
a[i]=rand()%100+1;
for(i=0;i
k=i;
for(j=i+1;j
if(i!=k)
{
temp=a[i];
a[i]=a[k];
a[k]=temp;
}
}
for (i=0;i<10;i++)
printf ("%d\n",a[i]);
return 0;
}
#include"stdio.h"voidmain(){inta[10];printf("Input10numbers!");printf("\n");for(inti=0;i0;i--){for(intj=0;ja[j+1]){inttemp=a[j];a[j]=a[j+1];a[j+1]=temp;}}}for(i=0;i<10;i++){printf("%5d",a[i]);}printf("\n");}