- 数组元素的赋值(杨辉三角、回形数等)
- 求数组型数组中元素的最大值、最小值、平均值、总和等
- 数组的复制、反转、查找(线性查找、二分法查找)
- 数组元素的排序算法
杨辉三角
![杨辉三角](https://i-blog.csdnimg.cn/blog_migrate/69df520ad81684095d18da9ca8784a15.png)
package project01;
public class AreaTest {
public static void main(String[] args) {
int[][] yanghui = new int[10][];
for (int i =0;i<yanghui.length;i++){
yanghui[i] = new int[i+1];
yanghui[i][0] = 1;
yanghui[i][i] = 1;
if (i>1){
for (int j =1;j<yanghui[i].length-1;j++){
yanghui[i][j] = yanghui[i-1][j-1] + yanghui[i-1][j];
}
}
}
for (int i =0;i<yanghui.length;i++){
for (int j =0;j<yanghui[i].length;j++){
System.out.print(yanghui[i][j]+" ");
}
System.out.println();
}
}
}
![杨辉三角结果](https://i-blog.csdnimg.cn/blog_migrate/21faaa5126ddcb20bb78c19bf58deff2.png)