C++ realizes the encapsulation of a function, and uses bubble sorting to sort the integer array in ascending order.

Full code:

#include<iostream>
using namespace std;

//定义一个冒泡排序升序函数;实现一维数组的升序排序;
//函数定义:
void maopao(int * p, int len)//也可写成int p[ ];引入数组的首地址p=arr;
{
   
    
    
	cout << "

Guess you like

Origin blog.csdn.net/LImitation_wxg/article/details/104930150