Friday, 31 August 2012

Name-Debasish Pradhan,Roll-29713,Assignment code-CSEL-10x

class Employee{
public static void main(String[] args){
double payment[]={0.00,0.00,0.00,0.00};
int hrs[]={35,47,73,65};
double bp[]={7.50,8.20,10.00,7.00};
for(int i =0;i<4;i )
{
if(bp[i]<8.00)
{
System.out.println('' ERROR '');
}
else if(hrs[i]>40 && hrs[i]<=60)
{
int ot=hrs[i]-40;
payment[i]=(bp[i]*40) (ot*bp[i]*1.5);
System.out.println('' payment is'' (i 1) "$" payment[i]);
}
}
}
}

Name-Ankit Sarkar,rollno.-29704,assignment code-CSEL-10x

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]); 
    

}

NAME-RAMESH KISAN,ROLL NO-29730,ASSIGNMENT CODE-CSEL-10x

class Payment
{
public static void main(String[] args)
{
int hrs[]={35,47,73,65};

double bp[]={7.50,8.20,10.00,7.00};

double totalsalary[]={0.00,0.00,0.00,0.00};


for(int i=0;i<4;i++)
{
if(bp[i]<8.00)
{
System.out.println("ERROR!! Basic Pay should not be less than the
minimum wage(i.e $8.00 per hour)");
}
else if(hrs[i]>40&&hrs[i]<=60)
{
int overtime=hrs[i]-40;
totalsalary[i]=(bp[i]*40)+(overtime*bp[i]*1.5);
System.out.println("Total salary of Employee:" + (i+1) + " is $" +
totalsalary[i]);
}
else if(hrs[i]>60)
{
totalsalary[i]=(bp[i]*40)+(20*bp[i]*1.5);
System.out.println("Total salary of Employee:" + (i+1) + " is $" +
totalsalary[i]);
}

}
}
}

Name-Soumya Ranjan Mohapatra,Roll No.-29737,Assignment Code-CSEL-10x

class Payment
{
public static void main(String[] args)
{
int hrs[]={35,47,73,65};

double bp[]={7.50,8.20,10.00,7.00};

double totalsalary[]={0.00,0.00,0.00,0.00};


for(int i=0;i<4;i++)
{
if(bp[i]<8.00)
{
System.out.println("ERROR!! Basic Pay should not be less than the
minimum wage(i.e $8.00 per hour)");
}
else if(hrs[i]>40&&hrs[i]<=60)
{
int overtime=hrs[i]-40;
totalsalary[i]=(bp[i]*40)+(overtime*bp[i]*1.5);
System.out.println("Total salary of Employee:" + (i+1) + " is $" +
totalsalary[i]);
}
else if(hrs[i]>60)
{
totalsalary[i]=(bp[i]*40)+(20*bp[i]*1.5);
System.out.println("Total salary of Employee:" + (i+1) + " is $" +
totalsalary[i]);
}

}
}
}

Thursday, 30 August 2012

Name: Soumit Ghosh, Roll No: 29736, Assignment Code: CSEL-10X

class Payment 
public static void main(String[] args) 
int hrs[]={35,47,73,65}; 

double bp[]={7.50,8.20,10.00,7.00}; 

double totalsalary[]={0.00,0.00,0.00,0.00}; 


for(int i=0;i<4;i++) 
if(bp[i]<8.00) 
System.out.println("ERROR!! Basic Pay should not be less than the minimum wage(i.e $8.00 per hour)"); 
else if(hrs[i]>40&&hrs[i]<=60) 
int overtime=hrs[i]-40; 
totalsalary[i]=(bp[i]*40)+(overtime*bp[i]*1.5); 
System.out.println("Total salary of Employee:" + (i+1) + " is $" + totalsalary[i]);
else if(hrs[i]>60) 
totalsalary[i]=(bp[i]*40)+(20*bp[i]*1.5); 
System.out.println("Total salary of Employee:" + (i+1) + " is $" + totalsalary[i]);

}

Dinesh Ku. Aggarwal , 29714 , CODE- CSEL-10X

Question :
An employee gets paid (hours worked) × (basic pay), for each hour up
to 40 hours.
For every hour over 40, they get overtime = (basic pay) × 1.5. The
basic pay must not be less than the minimum wage ($8.00 an hour).
If it is, print an error.
If the number of hours is greater than 60, he is paid for 60 hours

Write a JAVA code to calculate for each of these employees:
Basic Pay Hours Worked
Employee 1 $7.50 35
Employee 2 $8.20 47
Employee 3 $10.00 73
Employee 4 $7.00 65.




Answer :
class Sal
{
double salary(double b,int h)
{
int i,j=0;
if(h<40)
{
j=h;
}
else if(h>40&&h<60)
{
i=h%40;
j=40;
}
else
{
i=20;
j=40;
}
double d=(j*b)+(i*1.5*b);
return d;
}
public static void main(String args[])
{
System.out.println("Enter the no. of emplyees for who you want to
calculate the salary");
int i=System.in.read();
for(int r=0;r<i;r++)
{
System.out.println("Enter the Basic Pay.");
double basic_pay=System.in.read();
if(basic_pay<8.0)
{
System.out.println("Basic Pay cannot be less than $8.00");
goto l;
}
System.out.println("Enter the no. of hours worked");
int hour=System.in.read();
double total_salary=salary(basic_pay,hour);
System.out.println("Total Salary of "+r+"th person is "+total_salary);
l:
}
}
}



Note : This program can be used to find the salaries of as many
persons according to the specified rules.

NAME- DEBAPRAKASH KALANDI, ROLL NO.-29711/1001105069, ASSIGNMENT CODE- CSEL-10X

/*QUESTION:
An employee gets paid (hours worked) × (basic pay), for each hour up
to 40 hours.
For every hour over 40, they get overtime = (basic pay) × 1.5. The
basic pay must not be less than the minimum wage ($8.00 an hour).
If it is, print an error.
If the number of hours is greater than 60, he is paid for 60 hours

Write a JAVA code to calculate for each of these employees:
Basic Pay Hours Worked
Employee 1 $7.50 35
Employee 2 $8.20 47
Employee 3 $10.00 73
Employee 4 $7.00 65. */


// ANSWER:
class Salary
{
public static void main(String[] args)
{
double basic[]={7.50,8.20,10.00,7.00};
int hr[]={35,47,73,65};
double sal[]={0.00,0.00,0.00,0.00};

for(int i=0;i<4;i++)
{
if(basic[i]<8.00)

{
System.out.println("\n ERROR, The basic pay
must not be less than the minimum wage ($8.00 an hour)");
}

else if(hr[i]>40&&hr[i]<=60)
{
int overtime=hr[i]-40;
total[i]=(basic[i]*40)+(overtime*basic[i]*1.5);
System.out.println(("Total Salary= "+total[i]+"$");
}

else if(hr[i]>60)
{
total[i]=(basic[i]*40)+(20*basic[i]*1.5);
System.out.println("Total Salary= "+total[i]+"$");
}
}
}

Name-Barsha Behera, Roll No.-29708, Assignment Code-CSEL-10x


public class Employee
{
public static void main(String[] args)
{
double basPay,salary[];
int hrs[], i;
basPay[0]=7.50;
basPay[1]=8.20;
basPay[2]=10.00;
basPay[3]=7.00;
hrs[0]=35;
hrs[1]=47;
hrs[2]=73;
hrs[3]=65;
for(i=0;i<4;i++)
{

if(basPay[i]<8.00)
{
System.out.println("ERROR!");

}
else
{
if(hrs[i]<=40)
{
salary[i]=basPay[i]*hrs[i];
}
else if(hrs[i]>40 && hrs[i]<=60)
{
int overtime=hrs[i]-40;
salary[i]=(40*basPay[i]+(overtime*basPay[i]*1.5));
}
else if(hrs[i]>60)
{
salary[i]=(40*basPay[i])+(20*basPay[i]*1.5);
}
}
}
for(i=0;i<4;i++)
{
if(basPay[i]>8.00)
{
System.out.println("The Salary Of"+i+1+"is"+salary[i]+"$");
}
}
}

Name: Amlan Mohanty , Roll No: 29703 , Assignment Code: CSEL-10x

//Program for calculating Employee Salary from given Basic Pay per hour
and Working Hour

class TotalSalary
{
public static void main(String[] args)
{
int hours[]={35,47,73,65};

double basicpay[]={7.50,8.20,10.00,7.00};

double totalsalary[]={0.00,0.00,0.00,0.00};


for(int i=0;i<4;i++)
{
if(basicpay[i]<8.00)
{
System.out.println("ERROR !!!  \t Basic Pay must not be less than minimum wage($8.00 per hour)");
}
else if(hours[i]>40&&hours[i]<=60)
{
int overtime=hours[i]-40;
totalsalary[i]=(basicpay[i]*40)+(overtime*basicpay[i]*1.5);
System.out.println((i+1)+"th Employee's Total Salary :
"+totalsalary[i]+"$");
}
else if(hours[i]>60)
{
totalsalary[i]=(basicpay[i]*40)+(20*basicpay[i]*1.5);
System.out.println((i+1)+"th Employee's Total Salary :
"+totalsalary[i]+"$");
}

} //end of for loop
} //end of main()
};//end of class

Name:-B N Y A Kharabela Swain , Roll:-29707 , Assignment Code:-CSEL-10X

class Salary
      {
       public static void main(String[] args)
             {
double basic[]={7.50,8.20,10.00,7.00};
int hr[]={35,47,73,65};
              double sal[]={0.00,0.00,0.00,0.00};

              for(int i=0;i<4;i++)
                  {
                  if(basic[i]<8.00)
                      {
                       System.out.println("\n The basic pay must not be less than the minimum wage ($8.00 an hour)");
                      }
                  else if(hours[i]>40&&hours[i]<=60)
                      {
                       int overtime=hours[i]-40;
                       total[i]=(basic[i]*40)+(overtime*basic[i]*1.5);
                       System.out.println(("Total Salary= "+total[i]+"$");
                      }
                  else if(hours[i]>60)
                      {
                       total[i]=(basic[i]*40)+(20*basic[i]*1.5);
                       System.out.println("Total Salary= "+total[i]+"$");
                      }
              }
       }


name: Bhavna Rath; rollno: 29709;code: CSEL-10X

class Salary
{
public static void main(String a[])
{
double basic[]={7.50,8.20,10.00,7.00};
int hr[]={35,47,73,65};
double sal[]={0.00,0.00,0.00,0.00};
for(int i=0;i<4;i++)
{
if(basic[i]<8.00)
{
System.out.println("\n........ERROR!!!");
}
if(basic[i]>8.00 && hr[i]<=40)
{
sal[i]=hr[i]*basic[i];
System.out.println("the salary ="+sal[i]);
}
if(basic[i]>8.00 && hr[i]>=40 &&hr[i]<=60)
{
double extra=hr[i]-40;
sal[i]=(40*basic[i]) + (extra*basic[i]*1.5);
System.out.println("the salary ="+sal[i]);
}
if(basic[i]>8.00 && hr[i]>=60)
{
sal[i]=(40*basic[i]) + (20*basic[i]*1.5);
System.out.println("the salary ="+sal[i]);
}
}
}
}

Name: Harekrushna Sahoo , Roll: 29716 , Assignment Code: CSEL-10x

//Program for calculating Total Salary from given Basic Pay per hour
and Working Hour

class TotalSalary
{
public static void main(String[] args)
{
int hours[]={35,47,73,65};

double basicpay[]={7.50,8.20,10.00,7.00};

double totalsalary[]={0.00,0.00,0.00,0.00};


for(int i=0;i<4;i++)
{
if(basicpay[i]<8.00)
{
System.out.println("ERROR !!!\tBasic Pay must not be less than
minimum wage($8.00 per hour)");
}
else if(hours[i]>40&&hours[i]<=60)
{
int overtime=hours[i]-40;
totalsalary[i]=(basicpay[i]*40)+(overtime*basicpay[i]*1.5);
System.out.println((i+1)+"th Employee's Total Salary :
"+totalsalary[i]+"$");
}
else if(hours[i]>60)
{
totalsalary[i]=(basicpay[i]*40)+(20*basicpay[i]*1.5);
System.out.println((i+1)+"th Employee's Total Salary :
"+totalsalary[i]+"$");
}

}
}
};

Wednesday, 29 August 2012

NAME-Deepak Bidyabhusan Das,ROLLNO-29744, ASSIGNMENT CODE-CSEL-10x

// Program for calculating salary amount
// Practioner- Deepak Bidyabhusan das
//DATE: 29:08:12


import java.lang.*;

class Employee
{

public static void main(String []args)
{

double basic_salary[]={7.50,8.20,10.00,7.00};
int hours_worked[]={35,47,73,65};
int i;
double amount[]={0.00,0.00,0.00,0.00};

for(i=0;i<4;i++)
{

if(basic_salary[i]<8.00)
{
System.out.println("\n ERROR IN DATA \n");
}

if(basic_salary[i]>8.00 && hours_worked[i]<=40)
{
amount[i]=hours_worked[i]*basic_salary[i];
System.out.println("\n the amount ="+amount[i]);
}

if(basic_salary[i]>8.00 && hours_worked[i]>=40 && hours_worked[i]<=60)
{
double overtime=hours_worked[i]-40;
amount[i]=(40*basic_salary[i]) + (overtime*basic_salary[i]*1.5);
System.out.println("\n the amount ="+amount[i]);
}

if(basic_salary[i]>8.00 && hours_worked[i]>=60)
{
amount[i]=(40*basic_salary[i]) + (20*basic_salary[i]*1.5);
System.out.println("\n the amount ="+amount[i]);
}

}// for loop

}// main method

} // class

NAME-Dharmananda swain,ROLLNO-29748,ASSIGNMENT CODE-CSEL-10x.

/* Program for calculating salary wage of employees */
import java.lang.*;
class Employee_salary{
public static void main(String []args){
double basic_pay[]={7.50,8.20,10.00,7.00};
int working_hour[]={35,47,73,65};
int i;
double wage[]={0.00,0.00,0.00,0.00};
// amount initialization

for(i=0;i<4;i++)
{

if(basic_pay[i]<8.00)
//condition for less than 8.00;
{
System.out.println("\nsalary can never be less than
8.00;error;;;;;;;;; \n");
}

if(basic_pay[i]>8.00 && working_hour[i]<=40)
//condition for simple salary;
{
wage[i]=working_hour[i]*basic_pay[i];
System.out.println("\n the wage ="+wage[i]);
}

if(basic_pay[i]>8.00 && working_hour[i]>=40 &&
working_hour[i]<=60)//condotion for overtime;
{
double overtime=working_hour[i]-40;
wage[i]=(40*basic_pay[i]) + (overtime*basic_pay[i]*1.5);
System.out.println("\n the wage ="+wage[i]);
}

if(basic_pay[i]>8.00 && working_hour[i]>=60)
//condition for 60 hours;
{
wage[i]=(40*basic_pay[i]) + (20*basic_pay[i]*1.5);
System.out.println("\n the wage ="+wage[i]);
}

}
//end of for loop;

}
//end of main;

}
//end of class;

Name-Ipsit Bibhudarshi, Roll No.-29719, Assignment Code-CSEL-10x

public class EmpSalary
{
                 public static void main(String[] args)
                       {
                            double basicPay[];
                            double salary[];
                            int hrsWrkd[];
                            int i;
                            basicPay[0]=7.50;
                            basicPay[1]=8.20;
                            basicPay[2]=10.00;
                            basicPay[3]=7.00;
                            hrsWrkd[0]=35;
                            hrsWrkd[1]=47;
                            hrsWrkd[2]=73;
                            hrsWrkd[3]=65;
             for(i=0;i<4;i++)
                 {

                     if(basicPay[i]<8.00)
                            {
                                  System.out.println("ERROR!Basic Pay is less than the minimum wage");

                             }
                     else
                            {
                                  if(hrsWrkd[i]<=40)
                                            {
                                                  salary[i]=basicPay[i]*hrsWrkd[i];
                                            }
                                 else if(hrsWrkd[i]>40 && hrsWrkd[i]<=60)
                                            {
                                                  int overtime=hrsWrkd[i]-40;
                                                  salary[i]=(40*basicPay[i]+(overtime*basicPay[i]*1.5));
                                            }
                                 else if(hrsWrkd[i]>60)
                                            {
                                                  salary[i]=(40*basicPay[i])+(20*basicPay[i]*1.5);
                                            }
                            }
                 }
          for(i=0;i<4;i++)
                  {
                          if(basicPay[i]>8.00)
                                    {
                                             System.out.println("The Salary Of"+i+1+"is"+salary[i]+"$");
                                    }
                  }
        }
}

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]);
}
}
}

Name:Akash Mohapatra, Roll: 29701, 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]);
}
}
}
}

Name-Pratik Panda, Roll no-29725, Assignment Code-CSEL-10x

class Employee
{
public static void main(String[] args)
{
double bsp[4],amount[4];
int hours[4],i,overtime=0;
bsp[0]=7.50;
bsp[1]=8.20;
bsp[2]=10.00;
bsp[3]=7.00;
hours[0]=35;
hours[1]=47;
hours[2]=73;
hours[3]=65;
for(i=0;i<4;i++)
{
if(bsp[i]<8.00)
{
System.out.println("The basic pay of employee "+i+" is less
than $8.00");
}
if(hours[i]<=40 && bsp[i]>=8.00)
{
amount[i]=hours[i]*bsp[i];
}
if(hours[i]>40 && hours[i]<=60 && bsp[i]>=8.00)
{
overtime=hours[i]-40;
amount[i]=(40*bsp[i])+(overtime*bsp[i]*1.5);
}
if(hours[i]>60 && bsp[i]>=8.00)
{
amount[i]=(40*bsp[i])+(20*bsp[i]*1.5);
}
}
for(i=0;i<4;i++)
{
if(bsp[i]>=8.00)
{
System.out.println("The wage of employee "+i+" is Rs."+amount[i]);
}
}
}
}

Wednesday, 22 August 2012

roll no 1-9, 10-19, 20-29, 30-39, 40-50; CODE-CSEL-10x dateline-31st AUG

An employee gets paid (hours worked) × (basic pay), for each hour up to 40 hours.
For every hour over 40, they get overtime = (basic pay) × 1.5. The basic pay must not be less than the minimum wage ($8.00 an hour).
If it is, print an error.
If the number of hours is greater than 60, he is paid for 60 hours

Write a program to calculate for each of these employees:
                  Basic Pay                Hours Worked
 Employee 1 $7.50                         35
 Employee 2 $8.20                         47
 Employee 3 $10.00                       73
 Employee 4 $7.00                         65

C Programming

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