Hi! i had a problem a about calculating the numbers:
the instruction is to declare a variable with a value of 150000 and placed a number format.
so i used it like this:
$value1 = number_format (150000,2);
then, the value is first displayed:
i add the dollar sign from the first so that when i displayed it in the browser, the dollar sign appears.
printf ("$ $value1");
next thing is to calculate the value1 with a 10% increase:
i used this
$finalvalue = $c1 * 0.1 + $c1;
or this
$finalvalue = number_format ($c2 * 0.1 + $c2, 2);
then, when i saw it in the browser the value is wrong.
the calculation should be like this:
150000 * 0.1 + 150000 = 165000
but the instructions said that the output of it must be in the format like this:
$ 165,000.00
so what am i going to do? when i used that formula above, the calculation goes wrong like this:
$ 165.00
any help will be appreciated. thanks!
the instruction is to declare a variable with a value of 150000 and placed a number format.
so i used it like this:
$value1 = number_format (150000,2);
then, the value is first displayed:
i add the dollar sign from the first so that when i displayed it in the browser, the dollar sign appears.
printf ("$ $value1");
next thing is to calculate the value1 with a 10% increase:
i used this
$finalvalue = $c1 * 0.1 + $c1;
or this
$finalvalue = number_format ($c2 * 0.1 + $c2, 2);
then, when i saw it in the browser the value is wrong.
the calculation should be like this:
150000 * 0.1 + 150000 = 165000
but the instructions said that the output of it must be in the format like this:
$ 165,000.00
so what am i going to do? when i used that formula above, the calculation goes wrong like this:
$ 165.00
any help will be appreciated. thanks!