DAY 2 PROGRAMMING .
http://php.flashwebhost.com/vineesh/...ariables_7.php
Code
Code:
<?php
$costOfApple = 100;
$costOfOrange = 70;
$totalCost = $costOfApple + $costOfOrange;
$discount = 0.2;
echo 'Cost of Apple = Rs. ' . $costOfApple . ' /- <br>';
echo 'Cost of Orange = Rs. ' . $costOfOrange . '/- <br>';
echo 'Total Cost = Rs. ' . $totalCost . '/- <br>';
echo 'Discount = Rs. ' . $totalCost * $discount . '/- <br>' ;
echo 'Cost after discount = Rs. ' . ( ( $totalCost ) - ( ($totalCost) * $discount )) . '/- <br>';
Bookmarks