package chap1;

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

public class test1023 {
 public static void main(String args[])throws Exception{
 BufferedReader br;
 int score1,score2,score3,score4,score5;
 br= new BufferedReader(new InputStreamReader(System.in));
 System.out.print("學號: 4020Q090");
 System.out.print("姓名: 李依靜" );
 
 System.out.print("科目1:程式設計");
 System.out.println("學分數1:'3'" );
 System.out.println("科目2:英文");
 System.out.print("學分數2: '2'" );
 System.out.println("科目3:國文");
 System.out.print("學分數3: '3'" );
 System.out.println("科目4:數學");
 System.out.print("學分數4: '3'" );
 System.out.println("科目5:統計學");
 System.out.print("學分數5: '3'" );
 
 System.out.println("請輸入成績1:");
 score1= Integer.parseInt(br.readLine());
 System.out.println("請輸入成績2:");
 score2= Integer.parseInt(br.readLine());
 System.out.println("請輸入成績3:");
 score3= Integer.parseInt(br.readLine());
 System.out.println("請輸入成績4:");
 score4=Integer.parseInt(br.readLine());
 System.out.println("請輸入成績5:");
 score5= Integer.parseInt(br.readLine());
 
 System.out.println("學號: 4020Q090");
 System.out.println("姓名: 李依靜");
 System.out.print("科目名稱"+"\t"+"程式設計"+"\t"+"英文"+"\t"+"國文"+"\t"+"數學"+"\t"+"統計學"+"\n");
 System.out.print("學分數"+"\t"+"'3'"+"\t"+"'2'"+"\t"+"'3'"+"\t"+"'3'"+"\t"+"'3'"+"\n");
 System.out.print("成績"+"\t"+"90"+"\t"+"80"+"\t"+"70"+"\t"+"60"+"\t"+"60"+"\n");
 
 System.out.print("加權平均分數="+((90*3)+(80*2)+(70*3)+(60*3)+(60*3))/(3+2+3+3+3));
 
 }
}

 

 

 

玥君 發表在 痞客邦 PIXNET 留言(0) 人氣()