I wrote a program for beginning C++ class that calculates costs of long distance calls using "if" and "else". The assignment was as follows: "Write a program that prompts the user for the number of minutes the call lasted and outputs the amount due. The minutes will be an integer. The output should be formatted as follows with columns lined up and dollar amounts displayed with 2 decimal places. Calls under 3 minutes get charged the full $2.00 and a partial minute counts as a full minute for billing purposes".
The program works but I think it has some things in it that could be re-written to make it shorter. I'm getting a little tired and I think I'm missing ways to make it more concise. Some feedback would be great, thanks.
also i hate to nag but you should get into the habit of using brackets with if statements if you ever deside to go to a programming competition the judges can be a little OCD and trust me ... you lose alot of points for improper syntax and how easy your code is read ive edited your code below
and whenever you use a constant the name should be in all capps im altering your code
advice programmer to programmer
Thank you to everyone that commented, I don't mind the criticism at all. I jumped into this class with hardly any prior programming knowledge so my methods aren't all that great, I appreciate the help.