PRF192_-_PE04_-_SP_2024_2607.webp
Mitsuri2003

PRF192_-_PE04_-_SP_2024_2607.webp

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
Chưa có bình luận nào.

Thông tin

Category
PRF192
Thêm bởi
Mitsuri2003
Ngày thêm
Lượt xem
1,264
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Image metadata

Filename
PRF192_-_PE04_-_SP_2024_2607.webp
File size
103.5 KB
Dimensions
2560px x 1281px

Share this media

Back
Bên trên Bottom