Small Code Online testing

Source: Internet
Author: User

#include "wz.h"//Alternative Void show (int a[],int n)     {    int  i=0;    for (i=0;i<n;i=i+2)         {         cout<<a[i]<< ":" <<a[i+1]<<endl;     }    }void paixu (int a[],int n)     {     int i=0,j=0;int temp1=0,temp2=0;    for (i=1;i<n;i=i+2)         {         for (j=i +2;j<n;j=j+2)              if (A[i]>a[j]) {TEMP1=A[I-1];TEMP2=A[I];A[I-1]=A[J-1];A[I]=A[J];A[J-1]=TEMP1;A[J]=TEMP2;}              if (A[i]==a[j]) {temp1=a[i-1];a[ I-1]=A[J-1];A[J-1]=TEMP1;}                                  }    }int main ()      {    int x=3;    // cin>>x;     int a[10]={1,22,2,12,3,45};    int i=0;      /**********    while (i<x+2)         {         cin>>a[i];         cin>>a[i+1];        i=i+2;          }   *************/    show (a,6);     paixu (a,6);     show (a,6);     return 0;}

}

650) this.width=650; "Src=" https://set1.mail.qq.com/cgi-bin/viewfile?f= a2bcbf0427c89ddfe9b81df1bf635af413c1a97a98c434dbd338bdf8d4b767baedd21b496085117725e45b2ec793a243ecfc4c116a4a91bbb33f57d5c 1531177791d2d633e247b8f5711caaf97f0cc1c3144ff388bd659dcef39827cadeda6f2&mailid=zc0514-xlfs9d_f~ zwyxtvirdzsf64&sid=svygikgw6c8hri55&net=831359242 "style=" border:none;vertical-align:middle; "alt=" viewfile?f=a2bcbf0427c89ddfe9b81df1bf635 "/>


Small Code Online testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.