3 ms·
With C it can be more like what you want. Stop using ?: if you don't like it. if (price > 100) return 10; else return 5; Replace with
by J_Darnley 13y ago
With C it can be more like what you want. Stop using ?: if you don't like it.
if (price > 100)
return 10;
else
return 5;
Replace with more named variables if you want.
- the_af 13y agoI'm going to guess wildgift was being sarcastic. COBOL syntax is so needlessly verbose it interferes with the understanding of the actual formula. I contend that return price > 100 ? 10 : 5; is way more readable.