خرید بک لینک

Vote count: 0

I'm trying to add a mark up percentage to the $cents per Mile, for some reason it ignores it. How can I create a var that I can enter a whole number for percentage and have it add it to the cost?

<?php 
$PriceofgallonGas = 2.59 ;
$precent = 50 ; 
?>



<?php
    function installVanFuel() {

        global $PriceofgallonGas,$precent;
        $TankMiles = 254;   
        $SizeofTankinGallons = 31;
        $mpg = $TankMiles / $SizeofTankinGallons;

        $markup = (1 + $percent/100);
        $centsPerMile = $PriceofgallonGas/$mpg;  
        echo round($centsPerMile*$markup, 2); 
    }
?>  

asked 35 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 19 ارديبهشت 1395 ساعت: 12:03

صفحه بندی