Monday, 27 August 2012

Name-Manoj Kumar Behera, Roll no-29722, Assignment Code-CSEL-10x

class emp
{
public static void main(string args[])
{
double bs[4];
double hw[4];
double amnt[4];
int i;
bs[0]=7.50;
bs[1]=8.20;
bs[2]=10.00;
bs[3]=7.00;
hw[0]=35;
hw[1]=47;
hw[2]=73;
hw[3]=65;
for(i=0;i<5;i++)
{
if(bs[i]<8.00)
{
System.out.println("ERROR");
}
if (bs[i]<8.00) && hw[i]>40 && hw[i]<=60)
{
ot=hw[i]-40;
amnt[i]=(40*bs[i]+(ot*bs[i]*1.5));
System.out.println(amount paid is"+i",amnt[i]);
}
if((bs[i]<8.00) && hw[i]<=40)
{
amnt[i]=bs[i]*hw[i];
System.out.println(amount paid is"+i",amnt[i]);
}
if(bs[i]<8.00 && hw[i]>60)
{
amnt[i]=bs[i]*60;
System.out.println(amount paid is"+i",amnt[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...