要求:输入基本工资进行一些计算。
package com.itheima.first;
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("请输入基本工资");
Scanner input=new Scanner(System.in);
int base=input.nextInt();
double wujiacost=base*0.2;
double housecost=base*0.15;
double salary=base+wujiacost+housecost;
System.out.println("员工工资明细为:");
System.out.println("基本工资为:"+base);
System.out.println("物价津贴为:"+wujiacost);
System.out.println("房租津贴为:"+housecost);
System.out.println("员工薪水为:"+salary);
}
}