PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp
Riza851

PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp

  • Media owner Riza851
  • Ngày thêm
6 of 6
Paper No: 8
5
10 5 2 20 3
20
OUTPUT:
20 10 5 2
Press any key to continue
Question 8:
(1 mark, file to be edited: Q8.c)
Your program allows the user to enter an array of N integers, where N is entered by the user (STDIN).
Next, ask the user to enter a integer M.
Find and print all the elements of the array. For prime elements, print its power of M (prime numbers are numbers that have exactly two factors, 1 and itself).
Below is an example:
Enter N = 7; array = {2, -2, 8, 0, 7, 9, 20); M = 3
7
+ 100%
Zoom
Close
Chưa có bình luận nào.

Thông tin

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

Image metadata

Filename
PRF192_-_FA_2024_-_PE_-_s_-_8_2867.webp
File size
284.5 KB
Dimensions
2880px x 1478px

Share this media

Back
Bên trên Bottom