close

#include
#include

using namespace std;

int main()
{
    int qq[100], number, ch=0, tmp;
    cout
    while (ch == 0)
    {   cin >> number;
        ch = 1;
        if( number0)
        {   for ( int j=0 ; j            {   cout                 cin >> qq[j];
            }
        }
        else
        {   cout             ch = 0;
        }
    }

    ch = 0;
    int count=number-1;
    while ( ch==0 )
    {   ch = 1;
        for ( int j=0 ; j        {   if( qq[j]>qq[j+1])
            {   tmp     = qq[j];
                qq[j]   = qq[j+1];
                qq[j+1] = tmp;
                ch      = 0;
            }
        }
        count = count-1;
    }

    for ( int j=0 ; j    {
        cout     }

    system("PAUSE");
    return 0;
}

全站熱搜
創作者介紹
創作者 alex2008 的頭像
alex2008

alex2008的部落格

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