December 2020
Beginner to intermediate
681 pages
11h 20m
English
In this chapter, we’ll look at repeated actions, input, and things to do with the character type.
This prints the query about age, then waits for keyboard input. If the user enters a number, that number is stored in ageInYears. (Anything else is likely to give ageInYears a 0 value.) ssin 1 waits for you to press Enter before it processes input, so backspacing is allowed.
ssin uses the same font and cursor as sout; they are both part of SSDL.
You may note how the << arrows go: with sout, they go from ...