#include<iostream>
using namespace std;
#include<string>
//成绩统计
int main()
{
//1、创建二维数组
int scroes[3][3] =
{
{100,100,100},
{100,95,100},
{100,100,96},
};
string names[3] = { "战三","李四","王五" };
//2、统计每个人的总合分数
for (int i = 0; i < 3; i++)
{
int sum = 0;//统计分数总和
for (int j = 0; j < 3; j++)
{
sum += scroes[i][j];
//cout << scroes[i][j] << " ";
}
cout << names[i] << "的总分为: " << sum << endl;
}
system("pause");
return 0;
}
#include<iostream>
using namespace std;
//冒泡排序函数 参数1 数组的首地址 参数2 数组长度
void bubbleSort(int * arr,int len)
{
for (int i = 0; i < len - 1; i++)
{
for (int j = 0; j < len - i - 1; j++)
{
if (arr[j] > arr[j + 1])
{
int tmp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = tmp;
}