How would you write this codes Php ?
Compose a conditional report (IF…ELSE) throughout PHP to the scenario underneath with correct coding requirements and indentations.
Hee McGee really wants to buy a different BMW.Hee possesses $12, 000 to pay.If your vehicle cost in excess of $12, 000, Hee could only get hold of a Honda and also echo “I may possibly only pay for a Honda.”.If Hee can afford to get a BMW, Hee possesses two selections.If he chooses a new red colouring BMW, reveal “My partner will ride with myself! “.If Hee chooses a red color BMW, reveal “My companion will ride with myself! “.
car = a number of value
limt = 12000
carcolor = a number of string conveying the color
if motor vehicle is above limit then
echo” Possible only find the money for a Honda”
else when car is lower than or equal to 12000 then
if carcolor is add up to red then
reveal My Sweetheart will vehicle with my family!! “;
else whenever carcolor is add up to blue then
reveal “My companion will ride with me”;
at least this could be my pseudo value you will be able to take this from below:D
$funds = 12000;
$bmw_cost = 15000;
$red = 0;
$pink = ONE;
if( $funds >= $bmw_cost )
…..if( $red )
……….reveal “My girldriend can ride together with me! “;
…..
…..elseif( $pink )
……….reveal “My companion will ride with myself! “;
…..else
……….reveal “I can not decide a new color intended for my BMW”;
…..
else
…..reveal “I could only have the funds for a Honda”;
Leave a Reply
You must be logged in to post a comment.