Wages of Staff

Write a program to calculate the wages of staff as rate given below.

Hours in a week Rate For first 48 hours Rs. K per hour For next 8 hours Rs. 1.25 K per hour For further hours Rs 1.5 K per hour

 

import java.util.*; class WagesOfStaff { public static void main() { System.out.println("Enter working hours of week"); Scanner in = new Scanner(System.in); int hour = in.nextInt(); if(hour <= 48) System.out.println("Your Wages is "+hour+"K"); else if(hour <= 56) System.out.println("Your Wages is "+(48 + 1.25*(hour-48))+"K"); else System.out.println("Your Wages is "+(48 + 1.25*8 + 1.5*(hour-56))+"K"); } }




For any desired program, please comment below. We will try our best to make that program available.

Comments

Popular Posts