1、在编译器中输入代码并将其保存为.cpp文件(C语言的文件扩展名.c,但为了使用C++中的一些好用的特性,请把文件扩展名改为C++的.cpp)
2、等价头文件:
#include<stdio.h>和#include<cstdio>
#include<math.h>和#include<cmath>
#include<string.h>和#include<cstring>
for(int i=;i<=length-;i++){
for(int j=;j<)length-i;j++){
if(a[j]>a[j+]){
int tmp=a[j];
a[j]=a[j+];
a[j+]=temp;
}
}
}