- #1

- 4

- 0

## Main Question or Discussion Point

hi there,

i have written a small program in C++ and if the user puts in the wrong values for some of the variables the operation will end up trying to square root a negative number and this returns that the answer is not a number

can anyone show me how to write an if function that if
or
are not numbers it will display an error message

thanks

i have written a small program in C++ and if the user puts in the wrong values for some of the variables the operation will end up trying to square root a negative number and this returns that the answer is not a number

can anyone show me how to write an if function that if

Code:

`double answerplus`

Code:

`double answerminus`

thanks