August 3, 2015 · Public
Whenever I run this code, I get an error about not having declared the variable "sum". However, I did declare the variable in the function "addNumbers". What might be the problem there? Am I missing something? Also, in line 22, how do I use the value returned by the function "addNumbers"? Simply using the function's name displays 1, no matter what numbers I use when prompted.