/* 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;
Subscribe to:
Post Comments (Atom)
Pro
https://drive.google.com/file/d/1II09HToizTTjISF5TlmGcc2ew_YxiFja/view?usp=drive_link
-
CLOUD COMPUTING - 1 by Dr. S K Nayak Table of Contents Syllabus Cloud c...
-
,Semester,Roll No,Regn No,Student Name,Mentor/faculty,Mentor Ph No,Mentor e Mail ,4th yr BTech,417001,2201105001,ABHILASH DEHURY,Prof S.N.Mi...
-
============================================= Lecture note, Monday 19 September 2016 07:00:48 AM IST ===================================...
No comments:
Post a Comment