Write a program to calculate the property tax. Property tax iscalculated on 92%
ID: 3613729 • Letter: W
Question
Write a program to calculate the property tax. Property tax iscalculated on 92% of the assessed value of the property. Forexample, if the assessed value is 100000, the property tax is on92000. Assume that the property tax rate is $1.05 for each $100 ofthe assessed value. Your program should prompt the user to enterthe assessed value of the property.Store the output in a file inthe following sample format:AssessedValue: $100000.00
TaxableAmount: $92000.00
Tax rate for each $100.00: $1.05
PropertyTax: $966.00
Format your output to have two decimal places.
Explanation / Answer
please rate - thanks import java.util.*; import java.io.*; public class untitled { public static void main(String []args)throwsFileNotFoundException {double value,taxable,rate=1.05,tax; PrintWriter output=new PrintWriter(new File("output.txt")); Scanner in = new Scanner(System.in); System.out.print("What properties assessed value? "); value=in.nextDouble(); taxable=value*.92; tax=taxable/100.*(rate/10.); output.printf("AssessedValue: $%.2f ", value); output.println(); output.printf("TaxableAmount: $%.2f ",taxable); output.println(); output.printf("Tax rate for each $100.00: $%.2f",rate); output.println(); output.printf("PropertyTax: $%.2f ",tax); output.close(); } }
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.