Tuesday, 4 September 2012

Name-Priyanka Nayak, Roll No.-29726, Assignment Code-CSEL-10x

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