import java.util.*;
public class array_x
{
public static void main(String args[])
{
int a[][]={{2,4,5},{7,9,10},{12,15,17}};
int key=0;
boolean g=false;
Scanner reader= new Scanner(System.in);
System.out.printf("输入一个数字
");
key = reader.nextInt();
for(int k=0; k<3; k++)
for(int j=0; j<3; j++)
if(key==a[k][j])
{
System.out.printf("a[%d][%d]== %d ==key",k,j,a[k][j]);
g=true;
}
if(g==false) System.out.printf("不在数组中
");
}
}