Computer Science, asked by krishabhadani517, 8 days ago

write a program in java to input the annual income of a person calculate the tax amount at the rate of 15% display income tax percentage and tax amount​

Answers

Answered by BrainlyProgrammer
3

Answer:

//Importing Scanner class from java.util package...

import java.util.Scanner;

class Income{

public static void main (String[] args){

//Creating object for Scanner class...

Scanner sc=new Scanner (System.in);

//Accepting input...

System.out.print("Enter your annual income:\t");

double Inc=sc.nextDouble();

//Calculating tax...

double tax=0.15*Inc;

// Or you can do.. double tax=(15/100)*Inc;

double taxPercent = (tax/income)*100;

System.out.println("Tax:"+tax);

System.out.println("Tax%="+taxPercent);

}

}

Similar questions