DevJourney · code I wrote while learning

Counter number of items falling within a specific range of quantities

2 items

README.md

Single File Programming Question

Problem Statement

Jenifer is developing a program for a warehouse management system that needs to analyze inventory data.

The program receives an array representing the quantities of different products in the warehouse. The task is to count the number of items falling within a specified range of quantities.

Help Jenifer to accomplish her task using pointers.

Input format :

The first line of input consists of an integer N, representing the number of products in the warehouse.

The second line consists of N space-separated integers, representing the quantity of products.

The third line consists of two space-separated integers, representing the lower limit and upper limit (range).

Output format :

The output prints the number of products falling within the specified range (both inclusive) of quantities.

Refer to the sample output for formatting specifications.

Code constraints :

In this scenario, the test cases fall under the following constraints:

1 ≤ N ≤ 25

1 ≤ quantity ≤ 100

Sample test cases :

Input 1 :

10 15 25 35 45 55 65 75 85 95 100 45 85

Output 1 :

5

Input 2 :

5 23 29 34 48 59 35 60

Output 2 :

2