Use the Numeric Entry Widget under the math question type:
Here is a basic example:
You can see how the grading of this question will work using the Preview Mode, for example:
Different forms of responses can be controlled by the advanced options.
Alternatively, if you wish the answers to include expressions, then chose Expression Responses