3 of 4 Paper No: 1
The given file Q3.c already contains statements to input data for the integer 1-D array named a and two integer variables named x and y. You should write statements to count all prime numbers in an array that are greater than or equal to x and less than or equal to y (the prime numbers start from 2).
Notes:
- You can create new functions if you see it is necessary.
- Do not edit given statements in the main function.
Sample input and output:
Input:
Enter the number of elements: 5
Array: 2 4 5 9 11
Enter x = 3
Enter y = 15
After processing: count = 2 (the prime numbers are: 5, 11)
Output for marking:
OUTPUT:2
Question 4:
Zoom
+ 100%
Close