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];
- int hours = 0;
- int pay = 0;
- for (int i = 0; i < state.length; i++) {
- if (state[i].equals(temp)) {
- hours += totalHours[i];
- pay += totalWages[i];
- }
- else {
- temp = state[i];
- hours = 0;
- pay = 0;
- if (hours / pay >= avgHourly * 1.1)
- System.out.println("10% higher than us average");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment