Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class NumberOne
- {
- public static void main(String[] args) {
- Scanner input = new Scanner (System.in);
- double cost, remainder, firstFee, fee, finalFee = 0;
- final double firstCost = 5000.00;
- System.out.println("Please enter the cost of the building: ");
- cost = input.nextDouble();
- firstFee = firstCost * 0.08;
- remainder = cost - firstCost;
- if (remainder <= 80000.00) {
- fee = remainder * 0.03;
- }
- else
- fee = remainder * 0.025;
- finalFee = finalFee + fee;
- System.out.println("The fee is: " +finalFee);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement