DAY 2 PHP PROGRAMMING
http://php.flashwebhost.com/tom/day_2_variables_7.php
Code:<?php $computerPrice = 20000 ; $printerPrice = 5000 ; $discount = 0.2 ; // 20% discount. $totalCost = $computerPrice + $printerPrice ; echo ' Total cost = Rs: ' . $totalCost . '/-' ; echo '<br>' ; echo ' Price after discount = Rs. ' . ($totalCost - ($totalCost * $discount )) . '/-' ;




Reply With Quote
Bookmarks