PRF192_-_PE_-_SP_2025_-_s_3_3464.webp
H

PRF192_-_PE_-_SP_2025_-_s_3_3464.webp

☑Kizspy.me
Question 2:
(1 mark, file to be edited: Q2.c)
Write a program that asks the user to enter a positive integer N and calculates the sum of squares from
1 to N. The sum of squares equals: 1^2+2^2 + 3^2 + ... + n^2
Below is an example of how the program will run:
For example, enter the value 10 for N
10
OUTPUT:
385
Press any key to continue
Question 3:
(1 mark, file to be edited: Q3.c)
Write a program that asks the user to enter an array of N integers, followed by an integer K.
Print numbers in the array that are divisible by K in reverse order.
Below is an example of how the program will run:
For example, enter N = 5, Array = (2, 6, 15, 10, 8}, K=2
Zoom
+ 100%
Close
Chưa có bình luận nào.

Thông tin

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

Share this media

Back
Bên trên Bottom