Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 17.04.2021
- import java.util.Scanner;
- public class Ex05 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner in = new Scanner(System.in);
- double price;
- double cash;
- double ins;
- double kast;
- // get data from user
- System.out.print("enter the total price: ");
- price = in.nextDouble();
- // process data
- cash = price * 20.0 / 100;
- ins = price * 80.0 / 100;
- kast = ins / 5.0;
- // print results
- System.out.println("cash = " + cash);
- System.out.println("Total for aksat = " + ins);
- System.out.println("kast = " + kast);
- in.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement