package ch7;
public class ch7_5_2
{
public static void main(String awgs[])
{
int x,n=0,p=0,n0=0;
int [][][][]a=new int[10][2][4][5];
int number [ ]={-1,0,3,4,-5,8};
for (x=0;x<=6;x++)
{
if(number[x]<=0)
{
if(number[x]==0)
{
n0++;
}
else
{
n++;
}
}
else
{
p++;
}
}
System.out.print(n0+" for 0 , "+p+" for positive "+n+" for negative");
}
}
========================
1 for 0 , 3 for positive 2 for negative
留言列表