Challenge: user input
So far, the programs you have written do some work and then output text to the console. In this challenge, you will modify your CountDown solution to ask for input from the user. In particular, you will ask the user what number the countdown should start from.
To make this happen, you need to know about two new functions: readline() and atoi() (pronounced “A to I”).
The readline function is the opposite of printf(). Rather than printing text to the screen, it gets text that user has entered.
Before you can use readline(), you must first add the library that contains it to your program.
In the project navigator, click the top-level Coolness item. In the editor area, click Build Phases and then the disclosure ...
Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.