You are on page 1of 2

import java.util.

Scanner;

/*
* 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.
*/

/**
*
* @author pc
*/
public class LBC_PeraPadala {

private static int rate;


public static void main(String[] args) {
String Customer_name;
Double amount, charges, total;

Scanner in = new Scanner (System.in);

System.out.println("Customer's Name: ");


Customer_name = in.nextLine();
System.out.println("Amount of Pera Padala:");
amount = in.nextDouble();

if (amount <= 500) {


rate = 30;
}
if (amount <= 501 && amount >= 1500) {
rate = 85;
}
if (amount <=1501 && amount >= 3500){
rate = 120;
}
if (amount <= 3501 && amount >= 5000){
rate = 180;
}
if (amount >= 5001){
rate = 220;
}

total = rate + amount;

System.out.println("Customer's Name: " + Customer_name);


System.out.println("Amount of Pera Padala: " + amount);
System.out.println("Charges of Pera Padala: " + rate);
System.out.println("The Total:" + total);

You might also like