Advertisement
Guest User

Untitled

a guest
May 22nd, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.15 KB | None | 0 0
  1. <?php
  2. $distance = 40;
  3.  
  4. $consumption = 5.5;
  5. $fuelPrice = 2.10;
  6. $result = $distance * ($consumption / 100 * $fuelPrice);
  7. printf("%.2f", $result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement