BEGIN { sum = 0.0; } { if ($2 > 40) { print $1; } sum += $2; } END { print "sum of population", sum; }