☑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