Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package prj24042021;
- // 24.04.2021
- import java.util.Scanner;
- public class Ex04 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner in = new Scanner(System.in);
- double sa3at, ajrSa3a, ajrShahri;
- System.out.print("number of hours: ");
- sa3at = in.nextDouble();
- System.out.print("price for hour: ");
- ajrSa3a = in.nextDouble();
- ajrShahri = sa3at * ajrSa3a;
- System.out.println("Toatal salary = " + ajrShahri);
- // start ex04
- double khasem; // 2% = 0.02
- double company; // 8% = 0.08
- khasem = 0.02 * ajrShahri;
- System.out.println("Khasem letawfeer: " + khasem);
- company = 0.08 * ajrShahri;
- System.out.println("company will pay: " + company);
- System.out.println("tawfeer = " + (khasem + company));
- System.out.println("Neto = " + (ajrShahri - khasem));
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement