anoniem Geplaatst: 8 mei 2013 Delen Geplaatst: 8 mei 2013 [code:1:b682e1bcfa]package Opgave1; import javax.swing.*; public class Inzend2 { public static void main(String[] args) { int cijfer = 8; int[][] BlastTable = new int[cijfer][cijfer]; for (int i = 0; i < cijfer; i++) { for (int j = 0; j < cijfer; j++) BlastTable[i][j] = 32 - j - i * cijfer; } printarray(BlastTable); System.exit(0); } public static void printarray(int[][] BlastTable) { int cijfer = BlastTable.length; StringBuilder table = new StringBuilder(); for (int i = 0; i < cijfer ; i++) { for (int j = 0; j < cijfer; j++) { table.append(BlastTable[i][j]); table.append("\n"); } } } }[/code:1:b682e1bcfa] Hello Ik heb probleem met Tabel. Het wordt nu alleen horizontaal weergegeven in een hele lange strook. Wat moet ik aanpassen om 8 getallen horizontaal en 8 verticaal te krijgen ? Quote Link naar reactie
Aanbevolen berichten
Om een reactie te plaatsen, moet je eerst inloggen