i was able to solve it and here is the solution if anyone wanted it
import java.util.Scanner;
public class HomeWork3
{
public static void main(String[] args)
{
String emp;
double hours = 0, rate = 0, gross = 0, overtime = 0,STtax = 0, FEDtax = 0, union = 0, net = 0, Tgross = 0, Agross = 0;
int num = 0;
Scanner kb = new Scanner(System.in);
while(num < 10)
{
System.out.printf("please enter the employee name\n ");
emp = kb.next();
System.out.printf("please enter worked hours\n ");
hours = kb.nextDouble();
if(hours >= 0 && hours <= 60)
{
System.out.printf("please enter the pay rate\n ");
rate = kb.nextDouble();
if(rate > 0 && rate <= 50)
{
if(hours <= 40)
overtime = 0;
else
overtime = (hours - 40) * rate * 1.5;
gross = (rate * 40) + overtime;
STtax = gross * 0.06;
FEDtax = gross * 0.12;
union = gross * 0.01;
net = gross - (STtax + FEDtax + union);
System.out.printf("hi %s\n", emp);
System.out.printf("worked hours %6.2f\n", hours);
System.out.printf("your pay rate $%2.4f\n", rate);
System.out.printf("OverTime is %2.2f\n", overtime);
System.out.printf("Gross income $%6.2f\n", gross);
System.out.printf("State tax $%6.2f\n", STtax);
System.out.printf("Federal tax $%6.2f\n", FEDtax);
System.out.printf("Union fees $%6.2f\n", union);
System.out.printf("NET $%6.2f\n", net);
num = num +1;
}
else
System.out.printf("Pay Rate can only be between 0 and 50\n");
Tgross = Tgross + gross;
Agross = Tgross / num;
System.out.printf("Total gross for all entered employees is $%6.3f\n", Tgross);
System.out.printf("Average gross for all entered employees is $%6.4f\n", Agross);
System.out.printf("number of entered employees is %d\n\n", num);
}
else
System.out.printf("Hours can only be between 0 and 60\n");
}
}
}
solved how to show all the output