Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void highestAverage(String[] state, String[] desc, String[] code, long[] totalWages, long[] totalHours, double avgHourly) {
- String temp = state[0];
- long hours = 0;
- long pay = 0;
- for (int i = 0; i < state.length; i++) {
- if (state[i].equals(temp)) {
- hours += totalHours[i];
- pay += totalWages[i];
- }
- else {
- if (pay / hours >= avgHourly * 1.1) {
- System.out.println("10% higher than us average");
- }
- temp = state[i];
- hours = totalHours[i];
- pay = totalWages[i];
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment