class RoundUpto2decimalPoints
{
public static void main(Args _args)
{
real cost = 0.057139;
info(strFmt('%1',round(cost,0.01)));
}
}
In the round function if you want to round up to 2 decimal places then put 0.01. Similarly for rounding up to 3 decimal places we will put 0.001 in the round function.
Thanks,
Uma
{
public static void main(Args _args)
{
real cost = 0.057139;
info(strFmt('%1',round(cost,0.01)));
}
}
In the round function if you want to round up to 2 decimal places then put 0.01. Similarly for rounding up to 3 decimal places we will put 0.001 in the round function.
Thanks,
Uma