3
05/11/2024 2:54 e m
Ämnesstart
Write a program that converts British pounds(real number) to dollars formatted to 3th decimal point.
1 British Pound = 1.31 Dollars
Examples:
2 Svar
3
05/11/2024 2:55 e m
My solution:
<?php $inputPounds = readline(); $dollar = $inputPounds * 1.31; echo number_format($dollar,3,'.','');
2
05/11/2024 2:56 e m
On 1 line:
<?php echo number_format(readline()*1.31,3,'.','');