标签:ios clu bsp pre cout 排序 stream for style
#include <iostream> using namespace std; int main() { int a[100], tmp = 0; for (int i = 0; i < 10; i++) cin >> a[i]; for (int i = 0; i < 10; i++) { for (int j = 0; j < 9 - i; j++) { if (a[j] > a[j + 1]) { tmp = a[j]; a[j] = a[j + 1]; a[j + 1] = tmp; } } } for (int i = 0; i < 10; i++) cout << a[i] << ‘ ‘; return 0; }
标签:ios clu bsp pre cout 排序 stream for style
原文地址:https://www.cnblogs.com/Hk456/p/10804881.html