Tuesday, 4 September 2012

NAME-ARPITA MOHAPATRA,ROLL-29705,CODE-CSEL-10X


class Employ
{
public static void main(String args[])
{
double bsp[4];
int hrs[4],i;
double amount[4];
bsp[0]=7.5;
bsp[1]=8.20;
bsp[2]=10.00;
bsp[3]=7.00;
hrs[0]=35;
hrs[1]=47;
hrs[2]=73;
hrs[3]=65;
for(i=0;i<4;i++)
{
if(bsp[i]<8.00)
System.out.println("ERROR!!!!!!!!!!");
else
{
if((bsp[i]<8.00)&&hrs[i]<=40)
amount[i]=(double)hrs*bsp[i];
if((bsp[i]<8.00)&&hrs[i]>=40&&hrs[i]<=60)
{
ovt=hrs[i]-40;
amount[i]=40*bsp[i]+((double)ovt*bsp[i]*1.5);
}
if((bsp[i]<8.00)&&hrs[i]>60)
amount[i]=60*bsp[i];
}
}
for(i=0;i<4;i++)
{
if(bsp[i]<(8.00))
{
System.out.println("Amount of employee"+i "is:" +amount[i]);
}
}
}
}

No comments:

Post a Comment

C Programming

  Table of Contents ​ About the Author 3 ​ Introduction 4 ​ Introduction to Computers 4 1. What is a Computer? 4 2. History...