// 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
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