

Java Program to calculate income tax on salary – Q19 | SQL with Manoj
source link: https://sqlwithmanoj.com/2009/01/10/java-program-to-calculate-income-tax-on-salary-q19/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Java Program to calculate income tax on salary – Q19
Q19: Java Program to calculate income tax on salary:
( sal < 1.5lac = 15%, 1.5 < sal 2.5lac = 30% )
import
javax.swing.*;
class
inc_tax{
public
static
void
main(String args[]){
String inp;
inp = JOptionPane.showInputDialog(
"Enter Salary: "
);
int
sal;
sal = Integer.parseInt(inp);
double
tax;
if
(sal <
150000
)
tax = sal *
15
/
100
;
else
if
(sal >=
150000
&& sal <
250000
)
tax = sal *
20
/
100
;
else
tax = sal *
30
/
100
;
System.out.println(
"Tax on Annual salary "
+ sal +
" is: "
+ tax);
}
}
… from College notes (BCA/MCA assignments):
Related
Recommend
-
4
Home > Cpp > C++ Program for String Manipulation (menu based) by using SWITCH CASE – Q5 C++ Program for S...
-
7
Java Program to Calculate Power of a Number Related Articles ...
-
15
How I Earned 9x My Job’s Salary from 5 Freelance Income StreamsBut April was my worst month ever, and this doesn’t reflect on my finances.Image created by the author on
-
11
Home > Cpp Graphics > C++ Graphics – 02 – Line program by Incremental Algorithm C++ Graphics – 0...
-
10
Home > Java > Java Program to write an Applet with menu bar containing Shape, Color item and Sub menu – Q56 ...
-
7
-
9
Java Program to Calculate the Power of a NumberJava Program to Calculate the Power of a Number30 Views03/06/2022In this video, we will see...
-
6
Python Program to Calculate and Print Bonus & Gross using Basic SalarySkip to content
-
9
Javascript program to calculate and print bonus and gross using basic salarySkip to conte...
-
13
Java Program to Calculate Area and Perimeter of RectangleThe area and perimeter of a rectangle can be calculated using the formula Area = length * width and Perimeter = 2 * (length + wi...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK