mmayoub

Ex05, 17.04.2021

Apr 20th, 2021
626
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 17.04.2021
  2. import java.util.Scanner;
  3.  
  4. public class Ex05 {
  5.  
  6.     public static void main(String[] args) {
  7.         // TODO Auto-generated method stub
  8.         Scanner in = new Scanner(System.in);
  9.  
  10.         double price;
  11.         double cash;
  12.         double ins;
  13.         double kast;
  14.  
  15.         // get data from user
  16.         System.out.print("enter the total price: ");
  17.         price = in.nextDouble();
  18.  
  19.         // process data
  20.         cash = price * 20.0 / 100;
  21.         ins = price * 80.0 / 100;
  22.         kast = ins / 5.0;
  23.  
  24.         // print results
  25.         System.out.println("cash = " + cash);
  26.         System.out.println("Total for aksat = " + ins);
  27.         System.out.println("kast = " + kast);
  28.  
  29.         in.close();
  30.     }
  31.  
  32. }
  33.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×