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
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));
}
}
Comments
Leave a comment