Match first two columns and calculate percent of average in third column

I have the need to match the first two columns and when they match, calculate the percent of average for the third columns. The following awk script does not give me the expected results.

awk 'NR==FNR {T[$1,$2]=$3; next} $1,$2 in T {P=T[$1,$2]/$3*100; printf "%s %s %.0f\n", $1, $2, (P>=0)?P:-P}' diff.file avg.file > output.file

percent of average = diff/avg * 100

Ill need to ignore/remove the minus/negative symbols if any in the output file.

Diff File

46.0625 -99.1042   11.6

Avg File

46.0625 -99.1042    12.3

expected output

46.0625 -99.1042    206

Any suggestions?

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.