I know im making a rookie mistake but...
Go to solution
Solved by minibois,
You are essentially asking the user for text input, so the code interprets this as plain text.
You have to make these either int or float. Float being a number with and int without decimals. You use them like this:
myNumberVar = parseInt(yourVariable); myNumberVar2 = parseFloat(yourVariable2);
After doing that piece of code, your can add up your variables.
of course once your user enters anything but a number, the system will crash though.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now