Read the question, write TypeScript on the right, then Run or Check.
QuestionHint and solution stay closed until you open them
readLine() reads a stdin line. Read two numbers and log their sum. Annotate the variables as number.
Examples
Input
3 5
Output
8
Input
10 -4
Output
6
Hint
- const a: number = Number(readLine());
Show correct code
Peek only after you have tried. You can still Check your own version.
const a: number = Number(readLine());
const b: number = Number(readLine());
console.log(a + b);
main.tstsc · readLine() · Ctrl + Enter
ResultIdle
Run to see output. Check grades the tests.