Skip to content
← Back to Community
Tip calculator
Profile icon
StevenMatiz

A simple calculator to help with tipping your waiter or waitress.

Asks the user for the bill, then prompts the user to pick any of the most common tip percentage options (15%, 18%, or 20%), and finally provides the user the original bill, tip, and the final bill. Also features a return option to rerun the program.

Tip Calculator thumbnail

Voters
Profile icon
MorganSmith14
Profile icon
buffhorse
Profile icon
AdCharity
Comments
hotnewtop
Profile icon
Andi_Chin

it's nice seeing people using C++ on here. Python and JS are kinda overrated

Profile icon
AdCharity

@Andi_Chin well I mean all languages are important but C++ is like foundational stuff

Profile icon
StevenMatiz

@Andi_Chin
Hi, thanks for the comment! C++ is the only language I know as of now haha. I do plan on learning Python and especially more of HTML during the summer or else time in the future.

Profile icon
AdCharity

have respect to all C programmers (I understand it and suck at it). Nice work.

Profile icon
StevenMatiz

@AdCharity Thanks! Just started out, means a lot to get a compliment from a pro.

Profile icon
AdCharity

@StevenMatiz please I'm not a pro - I'm just a self learner :D I started out with higher level languages (meaning they are more readable to the user; it has nothing to do with difficulty) so I've always thought as people who start off in lower level languages like C to be pretty amazing.

Edit: happy programming

Profile icon
mamamia5x

@AdCharity C++ *puts on nerd glasses*

Profile icon
AsaM

This is super cool! Also am I reading this wrong or is "The bill after the tip is" supposed to subtract the tip from the bill?
Here is what I got. I thought it would add the bill and the tip but I'm kind of simple some times...

Please pick a tip option for $20.00.

Press 1 for 12% (minimum tip). Press 2 for 15% (medium tip). Press 3 for 20% (high tip).

Enter option here: 3

The bill is $20.00 The tip is $4.00 The bill after the tip is $16.00
Profile icon
StevenMatiz

@AsaM
Hey! So believe it or not, I went out to a restaurant (Buffalo Wild Wings) and I used this and ran into the exact same problem. As it turns out, I made a little comprehension mistake when I typed the code! In the code, I programmed final bill as "bill"-"tip" instead of "bill" +"tip". It was a good laugh when I saw that my "final bill" was less than my original bill! Anyways, if I hadn't gone out tonight, I bet I wouldn't have found this. Thank you for catching this and bringing it to my attention!