package employee;
public class employee1 {
public static void main(String args[])
{
double bp[]=new double[4];
int hrs[]=new int[4],i;
double amount[]=new double[4];
bp[0]=7.5;
bp[1]=8.20;
bp[2]=10.00;
bp[3]=7.00;
hrs[0]=35;
hrs[1]=47;
hrs[2]=73;
hrs[3]=65;
for(i=0;i<0;i++)
{
if(bp[i]<8.00)
{
System.out.println("ERROR!!!!!!!!!!");
}
else if(hrs[i]>=60&&hrs[i]>=40)
{
int ovtm=hrs[i]-40;
amount[i]= bp[i]*40+ovtm*1.5;
}
if((bp[i]>=8.00)&&hrs[i]>60) {
amount[i]=bp[i]*40+20*1.5;
}
}
for(int j=0;j<=4;j++){
System.out.println("Amount of employee is "+j+" " +amount[i]);
}
}
}
No comments:
Post a Comment