Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $value = readline();
- $in = readline();
- $out= readline();
- if ($in == "USD") $value = $value * 1.79549;
- else if ($in == "EUR") $value = $value * 1.95583;
- else if ($in == "GBP") $value = $value * 2.53405;
- if ($out == "USD") $value = $value / 1.79549;
- else if ($out == "EUR") $value = $value / 1.95583;
- else if ($out == "GBP") $value = $value / 2.53405;
- printf("%.2f $out",$value);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement