import java.util.Scanner;
public class 員工調增薪資 {
public static void main(String[] args) {
// TODO 自動產生的方法 Stub
Scanner sc = new Scanner(System.in);
System.out.println("請輸入一位員工的薪資或輸入A~Z之任一字元結束。:");
String st = sc.nextLine();
String[] str_inc = st.split(" ");
int total = 0;
for (int i = 0; i < str_inc.length; i++) {
int income = Integer.valueOf(str_inc[i]);
double per_total = income * (1 + 0.03);
double increase = income * 0.03;
if (per_total <= 5000) {
System.out.println("調整後薪資為: " + (int) (per_total));
total += increase;
}
}
System.out.println("調薪後公司總薪資之增幅為: "+(int)(total));
sc.close();
}
}