Showing posts with label two dimentional array. Show all posts
Showing posts with label two dimentional array. Show all posts

Tuesday, September 28, 2010

Multiplication table using Array

public class sample

{
public static void main(String args[])
{
int arr[][]=new int[10][10];
int x,y;
for(x=1;x<=arr.length-1; x++)
{
for(y=1;y<=arr.length-1; y++)
{
System.out.print(" \t");
System.out.print(arr[x][y]=x*y );
}
System.out.print("\n");

}
}
}