Привет ребята, помогите решить задачу с треугольником паскаля. Нужно этот треугольник описать в 300 строк для бесконечного числа, треугольник у меня готов
[import java.util.Scanner;
public class PascalTriangle {
public static void main(String[] args) {
int LINES = 0;
System.out.println("Enter number of lines for Pascal Triangle:");
try (Scanner reader = new Scanner(System.in)) {
LINES = reader.nextInt();
}
// Calculation and print
int [][] p = new int [LINES][];
p[0] = new int [1];
p[1] = new int [2];
p[1][0] = p[1][1] = 1;
System.out.println(p[0][0] = 1);
System.out.println(p[1][0] + " " + p[1][1]);
for (int i = 2; i < LINES; i++)
{
p[i] = new int [i+1];
System.out.print((p[i][0] = 1) + " ");
for (int j = 1; j < i; j++)
{
System.out.print((p[i][j] = p[i-1][j-1] + p[i-1][j]) + " ");
}
System.out.println(p[i][i]=1);
}
}
}]
подскажите пожалуйста как мне его дополнить на 300 строк? Я не пойму что от меня препод хочет( Всем спасибо откликнувшимся)
Выбирайте раздел правильно! Перенесено из раздела Паскаль.
Why not settling on games that is fun and at the same time your earning. Well itll make suspense because of the game as well but dude just try it and it gave me hope while pandemic is real rn. https://vypoker.com/4-factors-to-consider-when-choosing-an-online-casino/