#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
int i,j;
int g[8]={98,26,54,34,69,71,48,12};
int t[8]={0};
for(i=0;i<8;i++)
{
for(j=1;j<8;j++)
{
if(g[i]<=g[j])

t[i]++;
}
}
cout<<"成績"<<"\t";
for(i=1;i<8;i++)
cout<<g[i]<<"\t";
cout<<endl;
cout<<"排名"<<"\t";
for(i=1;i<8;i++)
cout<<t[i]<<"\t";
cout<<endl;
   
    system("PAUSE");
    return EXIT_SUCCESS;
}

arrow
arrow
    全站熱搜

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