9/27/10



multiplication table 2D arrays (Rows and Columns)

9/27/2010




import javax.swing.JOptionPane;


public class MultTable{


public static void main(String[] args){

int i = 0, j = 0, k = 1, row = 0, column = 0;
int [][] arrayOfNum;
String inputRow = "", inputColumn = "";

inputRow = JOptionPane.showInputDialog("Enter any positive real number of rows you want to input: ");
row = Integer.parseInt(inputRow);


inputColumn = JOptionPane.showInputDialog("Enter any positive real number of columns you want to input: ");
column = Integer.parseInt(inputColumn);

arrayOfNum = new int [row][column];
System.out.println("\n\t" + "PROGRAMMER: Andy F. Go\n\t"
+ "BSCS (II-A)\n\t" + "DATE: August 07, 2010\n\t" + "\n\n********* MULTIPLICATION TABLE *********\n");
for(i = 0; i

for(j=0; j


arrayOfNum [i][j] = (j+1)*k;
System.out.print(arrayOfNum[i][j] + "\t");
}
System.out.println("");
++k;
}

System.exit(0);
}


}



Your thoughts about this post? Leave a commment now.

Posted by

AndyFGo : A place for Pinoy Music News. Lyrics. Music Videos. Pinoy Movie/Foreign Trailers. OPM.

 

© 2013 andyfgo. All rights reserved. Designed by Templateism. Powered by Blogger
Protected by Copyscape DMCA Takedown Notice Violation Search

Back To Top