How would you write this codes?

Compose a conditional report (IF…ELSE) to the scenario below with proper coding standards 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! “.

But that you do not say throughout programming language you need to program.

It could be something such as this.

Get hold of a new BMW
if(car>12000)

echo/cout/printf (“I may possibly only aford a Honda”);

else
if(car==red)

echo/cout/printf (“My significant other will cruise with me! “);
else
if(car==pink)

echo/cout/printf (“My sweetheart will cruise with me! “);

Leave a Reply