Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- import java.util.Random;
- import java.util.Scanner;
- import java.util.Arrays;
- /**
- *
- * @author ja
- */
- public class Main {
- char[][] zadanie5(int ilosc) {
- char[][] tab = new char[ilosc][ilosc];
- for (int i = 0; i < tab.length; i++) {
- System.out.println();
- for (int j = 0; j < tab.length; j++) {
- if ((i == j) || (i > j)) {
- tab[i][j] = '*';
- }
- System.out.print(tab[i][j] + " ");
- }
- }
- return tab;
- }
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Main a = new Main();
- a.zadanie5(10);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement