Display problem

In reply to timag:
While printing the real number, use the format specifier as %0.2f instead of %f.

Exa:

$display("real num=%0.2f",num);