Zebra0.com

java switchCalulate tip based on service:Y or N

Calulate tip based on service:Y or N

In this example, we calculate the tip as 20% if the service is 'Y' or 'y'. Otherwise, the tip is 15%Compare this to the example using if/else.