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