[Solved] need to convert decimal to integer

Using below command

awk 'NR==FNR{A[NR]=$1;next}
{sum+=($2*A[FNR])}END{OFMT="%20f";print int(sum)}' Market.txt Product.txt

answer:

351770174.00000

how to convert this to 351770174.

when i try with below command i am getting different result.

awk 'NR==FNR{A[NR]=$1;next}
{sum+=($2*A[FNR])}END{OFMT="%20d";print sum}' Market.txt Product.txt

answer:

1040187392.

Please tell me how to concert decimal to integer.

have u tried...

 
awk 'NR==FNR{A[NR]=$1;next}
{sum+=($2*A[FNR])}END{OFMT="%20.0f";print int(sum)}' Market.txt Product.txt

ya i tried..
i a getting different answer as 1040187392

---------- Post updated at 09:01 AM ---------- Previous update was at 08:56 AM ----------

its working thanks...

END {printf "%20d\n", sum}

Regards,
Alister