Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package xoamulaptrinh_baitap_lan2;
- import java.util.Scanner;
- /**
- *
- * @author Le Chi Toan
- */
- public class bai10 {
- public double luong_SauThue() {
- double salary = 0;
- Scanner input = new Scanner(System.in);
- System.out.println("Moi nguoi dung nhap luong truoc thue: ");
- double luong = input.nextDouble();
- if (luong >= 15000000) {
- salary = luong - (luong * 0.35);
- }
- if (luong < 15000000 && luong >= 7000000) {
- salary = luong - (luong * 0.21);
- }
- if (luong < 7000000) {
- salary = luong - (luong * 0.11);
- }
- return salary;
- }
- public static void main(String[] args) {
- bai10 t = new bai10();
- System.out.println("===================Bai 10: Tinh Khau Tru Luong===================");
- double luong=t.luong_SauThue();
- System.out.println("Luong sau thue la: "+luong);
- }
- }
Add Comment
Please, Sign In to add comment