Thursday, 30 August 2012
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]+"$");
}
}
}
Subscribe to:
Post Comments (Atom)
C Programming
Table of Contents About the Author 3 Introduction 4 Introduction to Computers 4 1. What is a Computer? 4 2. History...
-
Semester,Roll No,Regn No,Student Name,Student Ph No,Mentor/faculty 3rd yr BTech,417001,2201105001,ABHILASH DEHURY,7846907407,Prof S.N.Mishra...
-
Practice Questions What are evolutionary changes in computing system? centralized computing to parallel distri...
-
CLOUD COMPUTING - 1 by Dr. S K Nayak Table of Contents Syllabus Cloud c...
No comments:
Post a Comment