How to output the highest and lowest values selected after entering 10 numbers between 1 to 100 in C : I am trying to write a C program that can accept 10 numbers between 1 and 100. If values outside the range are entered an error message should be displayed.

I have managed to write the following code to check for the to check if the numbers are between 1 to 100

```
#include <stdio.h>

int main() {
   int num1, num2, num3, num4, num5, num6, num7, num8, num9, num10;
 
   printf("\nEnter the first number : ");
   scanf("%d", &num1);
 
   printf("\nEnter the second number : ");
   scanf("%d", &num2);
   
      printf("\nEnter the third number : ");
   scanf("%d", &num3);
 
   printf("\nEnter the fourth number : ");
   scanf("%d", &num4);
  
   printf("\nEnter the fifth number : ");
   scanf("%d", &num5);
 
   printf("\nEnter the sixth number : ");
   scanf("%d", &num6);
   
      printf("\nEnter the seventh number : ");
   scanf("%d", &num7);
 
   printf("\nEnter the eighth number : ");
   scanf("%d", &num8);
      
      printf("\nEnter the nineth number : ");
   scanf("%d", &num9);
 
   printf("\nEnter the tenth number : ");
   scanf("%d", &num10);
   
   if ((num1 <= 1 &&  num2 <= 1 &&  num3 <= 1 &&  num4 <= 1 &&  num5 <= 1 &&  num6 <= 1 &&  num7 <= 1 &&  num8 <= 1 &&  num9 <= 1 &&  num10 <= 1) &&
   (num1 >= 100 &&  num2 >= 100 &&  num3 >= 100 &&  num4 >= 100 &&  num5 >= 100 &&  num6 >= 100 &&  num7 >= 100 &&  num8 >= 100 &&  num9 >= 100 &&  num10 >= 100)){
    printf("good");
        
        printf("Numbers are good");
        
   }else{
        printf("All numbers must be between 1 to 100");
   }
 
   return (0);
}
```

When i run the code i get this output "All numbers must be between 1 to 100" Even if the numbers i enter are between the range of 1-100. i expect the output to be "Numbers are good". Please help.