How to print a 10-row Yang Hui triangle using a two-dimensional array by java
Editor to share with you how java uses a two-dimensional array to print a 10-line Yang Hui triangle. I believe most people don't know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
Use a two-dimensional array to print a 10-line Yang Hui triangle public class T02 {public static void main (String [] args) {/ / declare and initialize the array int [] [] arr=new int [10] []; / assign for to the elements of the array
< arr.length;i++){ arr[i]=new int[i+1]; arr[i][0]=arr[i][i]=1; if(i>1) {for (int kryp1witk)