缘由https://bbs.csdn.net/topics/396523482
void 指针实数排序(double* aa, int d)
{//缘由https://bbs.csdn.net/topics/396523482
double lin = 0; int j = d, jj = 0;
while (jj < d) if (--j > jj) if (aa[j] > aa[j - 1])
lin = aa[j], aa[j] = aa[j - 1], aa[j - 1] = lin;
else; else ++jj, j = d;//冒泡排序
}
int l = 0, j = 0; cin >> l; double aa[47]{};
while (j < l)cin >> aa[j++]; 指针实数排序(aa, l);
j = 0; cout << setiosflags(ios_base::fixed); cout.precision(2);
while (j < l)cout << aa[j++], (j < l ? cout << ends : cout << endl);