ICSE Class 8 Computer Studies Question 7 of 8

Introduction to Java & BlueJ — Question 7

Back to all questions
7
Question

Question 7

Write a program to calculate the tax for a taxable income of Rs. 4,10,000, if the tax rate is fixed at 3.2%.

public class KboatTax
{
    public static void main(String args[]) {
        int income = 410000;
        double rate = 3.2;
        double tax = income * rate / 100;
        System.out.println("Tax = " + tax);
    }
}
Output
BlueJ output of KboatTax.java
Answer