Answer to Question #326374 in Java | JSP | JSF for Isaac

Question #326374

Write a program to calculate the property tax. property tax is calculated on 85% of the assessed value of the property. For example, if the assessed value is 500 000, the property tax is 425 000. Assume that the property tax rate is R1,25 for each R100 of the assessed value. Your program should prompt the user to enter the assessed value of the property. Store the output in a file in the following sample format:


Assessed Value: R 500 000.00

Taxable Amount: R 425 000.00

The tax rate for each R100.00 is R 1.25

Property Tax: R 5 312.50


1
Expert's answer
2022-04-11T16:52:06-0400
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);

        System.out.print("Assessed Value: R ");
        double num = in.nextDouble();

        System.out.printf("Taxable Amount: R %.2f\n", (num*0.85));

        System.out.println("The tax rate for each R100.00 is R 1.25");

        System.out.printf("Property Tax: R %.2f", (((num*0.85)/100)*1.25));


    }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS