/*Bubbling Program*/
#include<stdio.h>
#define N 5//Defining the arrys N is five//
int main() {
	int arrys[N],i,j,temp;
	for(i=0; i<N; i++) {
		scanf("%d",&arrys[i]);
	}
	for(i=0; i<N; i++) {
		for(j=0; j<N-1-i; j++) { //Many students can write j<N-i,in fact ,which is rong.Thinking why?//
			if(arrys[j]>arrys[j+1]) {//Changing the  number//
				temp=arrys[j];
				arrys[j]=arrys[j+1];
				arrys[j+1]=temp;
			}
		}
	}
//ergodic and output format//
	for(i=0; i<N; i++)
		printf("%4d",arrys[i]);
	return 0;
}![在这里插入图片描述](https://img-blog.csdnimg.cn/2020022410424226.PNG?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NTcxMzM1Mg==,size_16,color_FFFFFF,t_70)
欢迎指出代码的不足之处,我很高兴你能指出我的错误。