Computer Science, asked by shashi007, 1 year ago

8.WAP to calculate tax for a taxable income of Rs 3,10,000 , if tax rate is fixed at 2.2% IN JAVA ONLY.

Answers

Answered by mishrarajan282
2
int income;
float tax;

if(income>=310000)
{
tax=income*2.2/100;
print(null,"Amount of tax =",+tax);
}
else
{
print("No tax is payable.");
}
Answered by stylishtamilachee
12

Answer:

public class Calculate

{

void calcTax( )

{

final double taxrate = 2.2 ;

double income = 310000, tax = 0 ;

tax = income * taxrate / 100 ;

System.out.println("Tax payable is Rs." + tax) ;

}

}

Output:

Tax payable is Rs. 6820.0

Note:

In Java, wherever you use multiple data types in single expression, Java will convert the types of participant values to make them of Same data type.

Similar questions