I am using book “The AWK programming langauge” by Aho ,Kernighan ..
On page 20 they have given a program which doesn’t work on my system.
emp.data is
Beth 4.00 0
Dan 3.75 0
Kathy 4.00 10
Mark 5.00 20
Mary 5.50 22
Susie 4.25 18
program they have given is
awk '{ printf("%6.2f %s\n" , $2*$3, $0) }' emp.data | sort
and the output they have given is

But my output is
0.00 Beth 4.00 0
0.00 Dan 3.75 0
100.00 Mark 5.00 20
121.00 Mary 5.50 22
40.00 Kathy 4.00 10
76.50 Susie 4.25 18
so whats happening ?
Try
sort -nat the end, to do a numerical sort. The default sort would put 10 before 2.