Zebra0.com

cpp conditionalConditional operator: ?

Conditional operator: ?

This example gives a 20% tip if the value of service is 'Y' or 'y'. When the user enters an answer as a character, it is important to test for both upper case and lower case.