Conditional Statements in C

  • + 0 comments
    char *array[]={"one","two","three","four","five","six","seven","eight","nine"};
    
    if ((1<=n) && (n<=9))
    {
        printf("%s\n",array[n-1]);
    }
    else {
    printf("Greater than 9");
    }