본문 바로가기
10줄 코딩

학생 점수 3과목 입력 받아서 평균 내기

by applejune 2021. 4. 2.

02줄 System.out.println(getTreeScores()); 

 

03줄  public static double getTreeScores() {

04줄  String stringScore = JOptionPane.showInputDialog(null, "3과목성적을 ','로 나열하세요");

05줄  int kor = Integer.parseInt(stringScore.split(",")[0])

 

마지막 줄  double avg =(int)   (((kor + eng +math) / 3.0)*100 )  /100; 

               return avg;