Advertisement
mmayoub

Ex02, 24.04.2021

Apr 25th, 2021
891
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package prj24042021;
  2.  
  3. // 24.04.2021
  4. import java.util.Scanner;
  5.  
  6. public class Ex02 {
  7.  
  8.     public static void main(String[] args) {
  9.         // TODO Auto-generated method stub
  10.  
  11.         Scanner in = new Scanner(System.in);
  12.  
  13.         // double sa3at ;
  14.         // double ajrSa3a;
  15.         // double ajrShahri;
  16.  
  17.         double sa3at, ajrSa3a, ajrShahri;
  18.         double mefra3a;
  19.         System.out.print("number of hours: ");
  20.         sa3at = in.nextDouble();
  21.  
  22.         System.out.print("price for hour: ");
  23.         ajrSa3a = in.nextDouble();
  24.  
  25.         System.out.print("mefra3a: ");
  26.         mefra3a = in.nextDouble();
  27.  
  28.         ajrShahri = sa3at * ajrSa3a - mefra3a;
  29.  
  30.         System.out.println("Toatal salary = " + ajrShahri);
  31.  
  32.         in.close();
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement