26.Employees at Arkenstone Consulting earn the basic hourly wage of Rs.500. In addition to this, they also receivea commission on the sales they generate while tending the counter. The commission given to them is calculatedaccording to the following table:Total SalesRs. 100 to less than Rs. 1000Rs. 1000 to less than Rs. 10000Rs. 10000 to less than Rs. 25000Rs. 25000 and aboveCommission Rate1%2%3%3.5%Write a program in Java that inputs the number of hours worked and the total sales. Compute the wages of the employees
Answers
Answered by
4
Answer:
import java.util.Scanner;
public class WagesoftheEmployess
{
public static void main(String args[])
{ Scanner java= new Scanner(System.in); System.out.print("Enter number of hours: ");
int hrs = java.nextInt();
System.out.print("Enter total sales: ");
int sales = java.nextInt();
double wage = hrs * 500;
double c = 0;
if (sales < 100)
c = 0;
else if (sales < 1000)
c = 1;
else if (sales < 10000)
c = 2;
else if (sales < 25000)
c = 3;
else c = 3.5;
double comm = c * sales / 100.0; wage += comm; System.out.println("Wage = " + wage);
}
}
Similar questions
Accountancy,
5 months ago
Math,
5 months ago
Hindi,
5 months ago
English,
10 months ago
Social Sciences,
1 year ago