Guest User

Untitled

a guest
Apr 16th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. public static void highestAverage(String[] state, String[] desc, String[] code, long[] totalWages, long[] totalHours, double avgHourly) {
  2. String temp = state[0];
  3. long hours = 0;
  4. long pay = 0;
  5. for (int i = 0; i < state.length; i++) {
  6. if (state[i].equals(temp)) {
  7. hours += totalHours[i];
  8. pay += totalWages[i];
  9. }
  10. else {
  11. if (pay / hours >= avgHourly * 1.1) {
  12. System.out.println("10% higher than us average");
  13. }
  14. temp = state[i];
  15. hours = totalHours[i];
  16. pay = totalWages[i];
  17.  
  18. }
  19. }
  20. }
  21. }
Add Comment
Please, Sign In to add comment