// Your task is to write a small C program called phone.c that uses scanf to read two values from standard input. 
#include <stdio.h>

int main() {
    char phone[11];
    printf("Type in a phone number:\n");
    fgets(phone, 11, stdin);

    int number;
    printf("Type in a number:\n");
    scanf("%d", &number);
    
    if (number == -1){
        printf("%s\n", phone);
    }
    else if ((0 <= number)&&(number <= 9)){
        printf("%d\n", phone[number]);
    }
    else {
        printf("ERROR");
        return 1;
    }

    return 0;
} 
It is supposed to print the digit of the phone number corresponding to the variable number