게시판 즐겨찾기
편집
드래그 앤 드롭으로
즐겨찾기 아이콘 위치 수정이 가능합니다.
여기서 뭐가 잘못된걸까요??
게시물ID : programmer_16353짧은주소 복사하기
작성자 : 성실나라
추천 : 0
조회수 : 570회
댓글수 : 2개
등록시간 : 2016/03/25 11:10:26
옵션
  • 본인삭제금지
import java.util.Scanner;
public class JavaProject {
public static void main (String args[]){
 Scanner a = new Scanner(System.in);
 double weight = 0;
 double height = 0;
 double StandardWeight = 0;
 String name = a.next();
 weight = a.nextDouble();
 height = a.nextDouble();
 StandardWeight = a.nextDouble();
 StandardWeight = (height/100)*(height/100)*22;
 System.out.println("이름,키(cm),체중(kg)을 입력하세요");
 System.out.println(name +"님의 키는"+height+"cm이고 체중은"+weight+"kg입니다");
 if(StandardWeight  System.out.println("표준체중은"+StandardWeight+"이므로 표준체중보다"+(weight-StandardWeight)+ "kg 과체중 입니다" );
 }
 else{
  System.out.println("표중체중은"+StandardWeight+"이므로 표준체중보다"+(StandardWeight-weight)+"kg 과체중 입니다");
 }
}
}
 
저 Scanner a 쪽에서 a is never closed 이렇게 뜨네요 계속
전체 추천리스트 보기
새로운 댓글이 없습니다.
새로운 댓글 확인하기
글쓰기
◀뒤로가기
PC버전
맨위로▲
공지 운영 자료창고 청소년보호