Zebra0.com

java ifelseCalculate tip based on service

Calculate tip based on service

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.