Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * KK KK JJJJJJJJJJ BBBBBBBB
- * KK KK JJ BB BB
- * KKKK JJ BBBBBBBB
- * KK KK JJ JJ BB BB
- * KK KK JJJJJJ BBBBBBBBBB
- *
- * Copyright 2018 Jordy Van Kerkvoorde
- */
- package h7;
- import java.util.Scanner;
- /**
- *
- * @author KeeJayBe
- */
- public class Oefening5 {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- int [][] lijst = new int[3][];
- for(int i = 0; i < lijst.length ; i++){
- System.out.println("Geef het aantal kolommen voor rij " + (i+1) + ": ");
- int a = s.nextInt();
- lijst[i] = new int[a];
- }
- //beter een enhanced for gebruiken ipv mijn gewone for maar het werkt wel
- for(int i = 0; i < lijst.length; i++){
- for(int j = 0; j < lijst[i].length; j++){
- System.out.print("item\t");
- }
- System.out.println("");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement