/* Problem 1 Write a function double sumValue (int n) that calculates the following sum: 1/1+1/2+1/3+1/4+…+1/n. In case and n is negative or zero, the function returns 0. For example: For n = 1, the function returns 1/1 = 1 For n = 2, the function returns 1/1 +1/2 = 1.5 For n = 3, the function returns 1 +1/2 + 1/3 = 1.833333, and etc. Write a C program that first randomly generates the size of the array, an integer between 10 and 20. Then, the program generates an array of integers in range -1 to 10. The program prints an array. Then, for each element of the array, the program uses function sumValue to find and print the corresponding sum. */ #include #include #include #define SIZE 20 //function prototypes void make_random_array(int A[], int size, int min, int max); void print_array(int A[], int size); double sumValue(int); int main(){ srand(time(NULL)); int i, A[SIZE], size=10+rand()%(20-10+1); double result; make_random_array(A,size, -1,10); print_array(A, size); for(i=0;i