I'm new to the forums, I am sorry if I do this incorrectly.
Here is my code :
1import java.util.Scanner;
2
3public class Lab4b
4
5{
6
7 public void main ()
8 {
9
10 Scanner input = new Scanner( System.in );
11
12 int employee_name;
13 int hours_worked;
14 int pay_rate;
15
16 System.out.println( "Employee: %d" , employee_name );
17
18 if ( hours_worked <= 40 )
19 System.out.println( "Gross pay: %d", hours_worked*pay_rate );
20
21 else
22 System.out.println( "Gross pay: %d", 1.5*pay_rate*hours_worked );
23
24 if (hours_worked <= 40 )
25 System.out.println( "Withholding Tax: %d", hours_worked*pay_rate*25% );
26
27 else
28 System.out.println( "Withholding Tax: %d", 1.5*pay_rate*hours_worked*25% );
29
30 if (hours_worked <= 40 )
31 System.out.println( "Net Pay: %d", hours_worked*pay_rate - hours_worked*pay_rate*25% );
32
33 else
34 System.out.println( "Net Pay: %d", 1.5*pay_rate*hours_worked - 1.5*pay_rate*hours_worked*25% );
35
36
37 }
38
39}
The error happens at the end of lines 25, 28 , 31 and 34. JDK says that the " ); " at the end of each statement is the problem, however I am unsure.
Thanks