Pascal's Triangle Format

前端 未结 8 1857
长发绾君心
长发绾君心 2020-12-03 08:38

The assignment is to create Pascal\'s Triangle without using arrays. I have the method that produces the values for the triangle below. The method accepts an integer for the

8条回答
  •  -上瘾入骨i
    2020-12-03 08:57

    import java.util.*;
    class Mine
    {
        public static void main(String ar[])
        {
            Scanner sc=new Scanner(System.in);
            int n=sc.nextInt();
            for(int i=1;i=3)
                        {
                            for(int m=2;m

提交回复
热议问题