Exercise 13 - due at 11:59:00 PM EDT on Sunday, 4/24/2022 Optional Exercise, but highly recommeded to help you prepare for the Final Exam All problems may be solved in the same program 1. A complex number is a number of the form x + iy, where x is the real part, and y is the imaginary part, with i representing the square root of -1. Create a complex number structure called Complex, that contains 2 double data elements - real and img. Write a function called read, that accepts an array of Complex types, the size of the array and reads in the values. In the main function. create an array of 10 Complex variables. Use the read function to read in the values. Then add all the complex numbers and print the sum. (The real and imaginary parts are added separately). Sample Run: Enter the 10 complex numbers (only enter x and y): 1 2.2 -4 1.5 3.2 2 8 8 12 1.7 1.9 -5 2.87 2.123 0 2.98 -0.5 -4.72 4.33 4.597 The sum is 28.8 + 15.38i 2. Write a C++ program that creates a structure Node, which has 2 other data elements - an integer called key, and a C++ string object called value. Read in the number of elements from the user and then create a dynamic array of structures for the given number of elements. Read in the values. Then write a function called search that accepts the array of structures, its size and an intger to searc for as parameters. In the function, implement linear search and return the value part of the structure. If it is not found, return "not found". Call the function to search the structures based on the key and print the corresponding value. Sample Run: Enter the number of elements: 5 Enter 5 key and values 11 Spongebob 99 Patrick 31 Squidward 64 Sandy 17 Larry Enter the key: 31 The corresponding value is Squidward 3. Write a C++ program that reads in numbers from the user and prints the squares of the numbers to a file called "squares.txt". Stop when the user enters 0. Sample Run: Enter numbers (0 to stop): 5 -12.4 19 2.5 -8 0 After the program is done, the file "squares.txt" should contain: 25 153.76 361 6.25 64 4. Write a C++ program that reads from a file called "SomeText.txt". The first line of the file will tell you how many lines are in the file. Use getline to read in each line and find the number of words in each line and print it. The input file is on the website and can be downloaded. Sample Run (for the given file): Line 1: 2 words Line 2: 13 words Line 3: 11 words Line 4: 10 words Line 5: 9 words 5. Write a C++ program that reads from a file called "lines.txt". This file contains an unknown number of doubles, one in each line. Find the average of the numbers in the file and print it. Sample Run (for the given file): The average is 24.86893