Simple Calculator
Root / Submissions / [.]
LacksCreated:
Version:Size:
A simple calculator I made with the help of Google. This is my first time coding anything. I'm just trying to learn the fundamentals atm. Constructive criticism welcome.
Replying to:triangle
Very nice for a first program! The one thing I'd change is making it ask for the first and second numbers instead of digits. The current wording works just fine, but I was worried for a second that I'd have to input my numbers 1 digit at a time.
Thanks for taking a look. That's a good point. When I showed my wife she was also confused by that.
I've noticed something weird where the program will keep the previous numbers you entered, so if you leave the two questions blank it will keep the previous numbers you used. Do you have any idea how I could clear the variables after each function is performed?
Apologies if I'm using the wrong terms.
Replying to:triangle
Very nice for a first program! The one thing I'd change is making it ask for the first and second numbers instead of digits. The current wording works just fine, but I was worried for a second that I'd have to input my numbers 1 digit at a time.
I see two solutions to that: you could reset the variables manually after each operation, or you could detect if nothing is entered and prompt the user to try again.