beecrowd | 1072

# Interval 2

Adapted by Neilor Tonin, URI Brazil

Timelimit: 1

Read an integer N. This N will be the number of integer numbers that will be read.

Print how many these numbers are in the interval [10,20] and how many values are out of this interval.

## Input

The first line of input is an integer (< 10000), that indicates the total number of test cases.
Each case is an integer number (-107 < X < 107).

## Output

For each test case, print how many numbers are in and how many values are out of the interval.

 Input Sample Output Sample 41412310-25 2 in2 out

### Demonstration:

What is Interval?
An interval is a range of numbers between two given numbers and includes all of the real numbers between those two numbers.
For example, the set of numbers x satisfying 0 ≤ x ≤ 5 is an interval that contains 0, 5, and all numbers between 0 and 5.
Here we apply a range-based for loop which will run between two numbers and checking the condition for finding the numbers of an interval such as [10,20] which are applied and printing the numbers.
N.B: Don't copy paste the code as same. Just try to understand it and try yourself.

## URI / BEECROWD Online Judge 1072 Solve in C :

```#include <stdio.h>
int main()
{
int x, a, i;

int in = 0;
int out = 0;

scanf("%d", &x);
for(i = 0; i < x; i++)
{
scanf("%d", &a);
if(a >= 10 && a <= 20){
in++;
}else{
out++;
}

}
printf("%d in\n", in);
printf("%d out\n", out);

return 0;
}
```