uestion 3:
(2 marks)
The given file Q3.c already contains statements to input data for the integer 1-D array and an integer variable x. You should write statements to print out the sum of elements are divisors of the x in the array.
Notes:
- You can create new function(s) if you see it is necessary.
- Do not edit given statements in the main function.
Sample input and output:
Enter number of elements:5
a[0]=3
a[1]=2
a[2]=5
a[3]=6
a[4]=4
Enter x:10
After processing: 2 + 5 = 7
Output for marking:
OUTPUT:7
Question 4:
(3 marks)
The given file Q4.c already contains statements to enter a string named s. You should write statements to
+ 88%
Zoom
Close