Thread View: aus.computers.java
1 messages
1 total messages
Started by mrbafner
Thu, 24 Jun 1999 00:00
HELP PLEASE,
Author: mrbafner
Date: Thu, 24 Jun 1999 00:00
Date: Thu, 24 Jun 1999 00:00
49 lines
1968 bytes
1968 bytes
i have written this program, to try and work out the tax taken from their
gross salaries.
I run it and 2 extra lines appear (blank), if you put in a interger number,
the net wage has these 2 numbers taken from it NOT THE TAX.
how can I work it out so the tax is taken from the net amount. It has to be
30% tax, with a 10,000 tax free threshhold based on the amount that has been
entered. PLEASE HELP I AM MY TETHER. (NEARLY SUICIDE).
THANKS
MrBafner
=====================================================
import java.io.*;
class PaulsMoney {
public static void main (String[] args)
throws IOException {
// create a text input stream
BufferedReader stdin = new BufferedReader
(new InputStreamReader (System.in));
String initString;
int initialSalary;
System.out.println ("TAX CALCULATION PROGRAM");
System.out.print ("Enter the employee's salary: ");
initString = stdin.readLine();
initialSalary = Integer.parseInt (initString);
int = initialSalary * .30;
if (initialSalary < 30000) {
System.out.print ("Tax Paid: ");
System.out.println (initialSalary * .30);
}
else; {
System.out.print ("Salary: ");
System.out.println (initialSalary);
}
}
}
===================================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads