게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
방금 입력한 숫자 중 가장 큰 수 출력하는 거 질문한 뉴비인데요
게시물ID : programmer_3379짧은주소 복사하기
작성자 : 드디어오레가
추천 : 0
조회수 : 449회
댓글수 : 4개
등록시간 : 2014/05/19 22:26:12
import java.io.*;
public class Norajo {
 public static void main(String[] args) throws IOException {
  
  InputStreamReader isr= new InputStreamReader (System.in)
  ;
  BufferedReader in = new BufferedReader(isr);
  
  String a, b, c, d, e, f, g, h, i, j;
 
  a = in.readLine();
  b = in.readLine();
  c = in.readLine();
  d = in.readLine();
  e = in.readLine();
  f = in.readLine();
  g = in.readLine();
  h = in.readLine();
  i = in.readLine();
  j = in.readLine();
 
  int inta = Integer.valueOf(a).intValue();
  int intb = Integer.valueOf(b).intValue();
  int intc = Integer.valueOf(c).intValue();
  int intd = Integer.valueOf(d).intValue();
  int inte = Integer.valueOf(e).intValue();
  int intf = Integer.valueOf(f).intValue();
  int intg = Integer.valueOf(g).intValue();
  int inth = Integer.valueOf(h).intValue();
  int inti = Integer.valueOf(i).intValue();
  int intj = Integer.valueOf(j).intValue();
  
  int[] A = new int[9];
  
  A[0] = inta;
  A[1] = intb;
  A[2] = intc;
  A[3] = intd;
  A[4] = inte;
  A[5] = intf;
  A[6] = intg;
  A[7] = inth;
  A[8] = inti;
  A[9] = intj;
 
 
위와 같이 써서 배열에 입력한 숫자를 넣는 것은 어떻게 성공했어요
이 글 보시는 분들은 더 간단하게 하실 수 있으시겠지만
제게는 아직 쓰는 것조차 버겁네요 ㅜ
 
다시 질문하자면 배열을 이용하라고 하신 건 알겠는데
그것을 어떤 식으로 해야 가장 큰 수를 뽑아지는 건지 모르겠어요
 
정말 죄송하지만 좀 더 자세히 설명해 주실 수 있을까요ㅠ?
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호