Computers and Technology
C++12.18 Lab - StructsIn this lab, you will familiarize yourself with structs through a small exercise. We will be mixing the RGB values of colors together to make a new one.RGB stands for red, green and blue. Each element describes the intensity value ranging from 0 - 255. For example: black color will have RGB values (0, 0, 0) while white will have (255, 255, 255).Create an array of structs color. The struct contains three integers named red, green and blue. This corresponds to the RGB values of a color. For each array element, ask the user to enter the intensity value of red, green and blue. The value should be between 0 and 255 (inclusive).*********The user can enter at most 10 colors. ********. see below for inputsAdditionally, compute the average of each of the red, green and blue components. For code modularity, implement a function that returns the average of each rgb component in your dynamic array. The function (called average) should take in a struct array, the rgb type for which you want to compute the average (as a string - red, blue or green) and its length. Print out the final result in the form (r, g, b), where r, g, b corresponds to each averaged value.Can you guess what color you mixed? (Note: Your program does not need to print the final color mixed)TEST #1Input ------->>> 0 0 2 2 4 2Expected output ----->>>> (1, 2, 2)TEST #2Input ------>>> 245 220 5 43 56 21 234 56 43Expected output ----->>>> (174, 110, 23)TEST #3Input ------->>> 225 221 2 43 56 21 224 56 43 120 110 24 25 25 27Expected output ----->>>> (127, 93, 23)TEST #4Input -------->>> 245 22 34Expected output ----->>>> (245, 22, 34)