#include "stdafx.h"
#include <iostream>
using namespace std;

void _tmain(int argc, _TCHAR* argv[])
{    
    int temp[10];    
    for(int i=0;i<10;i++)
    {
        cin>>temp[i];
        int k=i;
        int key=temp[k];
        while(k>0&&temp[k-1]<key)
        {
            temp[k]=temp[k-1];
            temp[k-1]=key;
            k--;            
        }    
    }
    for(int s=0;s<10;s++)
    {
        cout<<temp[s]<<" ";
    }
    cout<<endl;
    int s;
    cin>>s;
}

 

相关文章:

  • 2021-09-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-09
猜你喜欢
  • 2021-04-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-18
  • 2021-12-02
  • 2021-06-21
相关资源
相似解决方案