#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int i,j,m,h;
int g[7];
cout<<"please input 7 number"<<"\t"<<endl;
for (h=0;h<7;h++)
{
cin>>g[h];
}
for(i=1;i<7;i++)
{
for(j=0;j<7-i;j++)
{
if(g[j]<g[j+1])
{
m=g[j];
g[j]=g[j+1];
g[j+1]=m;
}
}
}
cout<<"成績(from large to small)"<<"\t"<<endl;
for(j=0;j<7;j++)
{
cout<<g[j]<<" ";
}
cout<<endl;
cout<<endl;
   
    system("PAUSE");
    return EXIT_SUCCESS;
}

 

arrow
arrow
    全站熱搜

    deskwoodss 發表在 痞客邦 留言(0) 人氣()