2nd challenge input question

So instead of going the ’ for’ route I decided to do it different using the while construction :slight_smile:

This main code at the bottom works fine except that I get a warning on

saying it’s an implicit declaration of function ‘atoi’. Can anyone explain what I do wrong here?

MAIN CODE

int main(int argc, const char * argv[])
{

    printf("Where should I start counting? ");
    
    const char *i = readline(NULL);
    int counter = atoi(i);
    
    while (counter >= 0) {
        printf("%d\n", counter);
    
        if (counter%5 == 0) {
            printf("Found one!, numer: %d\n", counter);
        }
        counter-=3;
 }

You haven’t included the following line of code…

#include <stdlib.h>

Refer to the paragraph near the end of chapter 8 that begins with…