#include<iostream> #define N 10 using namespace std; int main(){ int a[N],x,i,aa; for(i=0;i<N;i++) scanf("%d",&a[i]); for(i=1;i<=N-1;i++) for(x=0;x<N-i;x++) { if(a[x]<a[x+1]) { aa=a[x]; a[x]=a[x+1]; a[x+1]=aa; } } for(i=0;i<N;i++) printf("%d \0",a[i]); return 0; }
标签:std,aa,10,int,第八天,打卡 From: https://www.cnblogs.com/gjsgjs/p/17354280.html