Posted by ixpict on Sat 2 May 14:51
report abuse | download | new post
- package helloworld;
- /**
- *
- * @author ixpict
- * @version 0.1a
- *
- */
- public class Main {
- public static final int LINES = 10; // Так определяются константы
- int[][] p = new int [LINES] [];
- p[0] = new int[1];
- p[1] = new int[2];
- p[1][0] = p[1][1] = 1;
- for (int i = 2; i < LINES; i++){
- p[i] = new int[i+1];
- for (int j = 1; j < i; j++){
- //вот эта фигня формирует центр
- }
- System. out. println(p[i][i] = 1); // эта фигня дописывает единичку в конец
- }
- }
- }
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.