import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class MaxMin {

 public static void main(String[] args) throws IOException{
  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
 
  int temp[] = new int[5];
  int max = 0;
  int min = 100;
 
  for (int i = 0; i < 5; i++) {
   System.out.print(i+1+"번째 숫자 : ");
   temp[i] = Integer.parseInt(in.readLine());
   max = Math.max(temp[i], max);
   min = Math.min(min, temp[i]);
  }
  System.out.println("최소값 : " + min);
  System.out.println("최대값 : " + max);
 }
}




AND