import java.lang.Math;
public class Answer1
{
public static void main(String[] args) throws Exception
{
int num[]=new int[100];
int i,max,min;
int j=0;
for (i=0;i<100 ;i++ )
{
num[i]=(int)(100*Math.random());
System.out.println("num["+i+"]="+num[i]);
}
max=num[0];
for (i=0;i<100 ;i++ )
{
if (num[i]>max)
{
max=num[i];
}
}
System.out.println("this time the max number is "+ max);
min=num[0];
for (i=0;i<100 ;i++ )
{
if (num[i]<min)
{
min=num[i];
}
}
System.out.println(" the min number is "+ min);
for (i=0;i<100 ;i++ )
{
if (num[i]>50)
{
j++;
}
}
System.out.println("there is "+j+ "larger than 50");
}
}
public class Answer1
{
public static void main(String[] args) throws Exception
{
int num[]=new int[100];
int i,max,min;
int j=0;
for (i=0;i<100 ;i++ )
{
num[i]=(int)(100*Math.random());
System.out.println("num["+i+"]="+num[i]);
}
max=num[0];
for (i=0;i<100 ;i++ )
{
if (num[i]>max)
{
max=num[i];
}
}
System.out.println("this time the max number is "+ max);
min=num[0];
for (i=0;i<100 ;i++ )
{
if (num[i]<min)
{
min=num[i];
}
}
System.out.println(" the min number is "+ min);
for (i=0;i<100 ;i++ )
{
if (num[i]>50)
{
j++;
}
}
System.out.println("there is "+j+ "larger than 50");
}
}