2d
/*
- 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.
*/
package javaapplication24;
/**
*
-
@author HP
*/
public class JavaApplication24 {/**
-
@param args the command line arguments
*/
public static void main(String[] args) {
int[][]table1 = new int[2][5];
int number = 100;for (int row=0; row<2; row++){
for (int col=0; col<5; col++){table1[row][col]= number; number -=10; System.out.print(table1[row][col] + "\t"); } System.out.println(" ");}
System.out.println(" ");
int[][]table2 = new int[3][9];
int number1 = -30;for (int row=0; row<3; row++){
for (int col=0; col<9; col++){table2[row][col]= number1; number1 +=10; System.out.print(table2[row][col] + "\t"); } System.out.println(" ");}
}
-
}