标签:style blog io color os sp for div log
#include<iostream> using namespace std; int main() { int num[] = {23,12,54,3,26,88,21}; for(int j=1;j<7;j++) { int key = num[j]; int i=j-1; while(i>=0 && num[i]>key) { num[i+1] = num[i]; i--; } num[i+1] = key; } for(int i=0;i<7;i++) cout<<num[i]<<" "; return 0; }
标签:style blog io color os sp for div log
原文地址:http://www.cnblogs.com/vitah/p/4080295.html