qse/ase/test/awk/emp-019.out

13 lines
177 B
Plaintext
Raw Normal View History

2006-11-19 07:45:46 +00:00
{
pay = (pay + ($2 * $3));
}
END {
2006-12-23 06:33:47 +00:00
print NR,"employees";
2006-11-19 07:45:46 +00:00
print "total pay is",pay;
2006-12-23 06:33:47 +00:00
print "average pay is",(pay / NR);
2006-11-19 07:45:46 +00:00
}
6 employees
total pay is 337.5
average pay is 56.25