Answer to Question #250792 in Java | JSP | JSF for NUCHO

Question #250792

Write a program that calculate and displays an employee’s weekly salary. If the hours worked are less or equal to 40, the employee is payed N$65.54 per hour, otherwise the employee receives N$80.20 for every hour worked exceeding 40.  


1
Expert's answer
2021-10-13T06:25:24-0400
import java.util.Scanner;


public class EmployeeWeeklySalary {


	public static void main(String[] args) {
		int weeklyHours=0;
		Scanner scan =new Scanner(System.in);
		System.out.println("Welcome to Emploee's weekly salary!!!");
		System.out.println("Please provide how many hours emploee work on this week and press Enter: ");
		weeklyHours=scan.nextInt();
		if(weeklyHours<=40) {
			System.out.println("Thank you.His payed is $65.54.");
		}else if(weeklyHours>=40) {
			System.out.println("Thank you.His payed is $80.20.");
		}
		scan.close();
	}
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS