qse/ase/cmd/awk/emp-025.out
2008-03-21 03:49:53 +00:00

13 lines
241 B
Plaintext

($2 > 6) {
n = (n + 1);
pay = (pay + ($2 * $3));
}
END {
if ((n > 0))
print n,"employees, total pay is",pay,"average pay is",(pay / n);
else
print "no employees are paid more than $6/hour";
}
no employees are paid more than $6/hour